Playing IonicFramework with Microsoft Visual Studio Cordova Tools CTP3, I found a series of articles on setup demo IonicFramework app with MS Cordova Tools.
Here is the links:
And this is a brief:
- Create a TypeScript Blank Cordova App in VS 2013
- Get the Ionic package from NuGet, drag ‘script/ionic-bundles.js’ and ‘content/ionic.css’ to index.html to create script references
- Use command ‘ionic start myApp sidemenu’ to create a project scaffold
- Copy ‘www/templates’ folder from scaffold project to VS project, let it be the same level of existing ‘scripts’ folder
- Create a ‘app’ folder inside ‘scripts’ folder, move index.ts from /scripts into /scripts/app, update reference of index.js in index.html. Copy app.js and controller.js from www/js of that scaffold project to /scripts/app folder.
- Add or adjust references of js/ts files to index.html, create a ng-app directive.
- Install angularjs.TypeScript.DefinitelyTyped by right click on angular.js in scripts folder and select “Search for Typescript Typings”.
- Create a services.ts file in scripts/app folder, create service and inject to Angular
- Create a controller.ts file, register service to controller.
- Modify template data binding to fetch data from the service
For building failure of “The certificate specified has expired” on Windows platform, it’s a bug of Cordova tools. See: http://www.spritehand.com/2014/11/visual-studio-cordova-certificate.html