Ionic is finally in pre-lease mode so it’s a good time to discover how to properly define a new project (assuming you’ve installed Ionic 2 already!).
1. Open up Terminal / command line and type the following:
ionic start myProject --v2 --ts
This will create the default tabbed Ionic app interface using Typescript (Typescript is good!). If you want a side menu app (a la Facebook):
ionic start myProject sidemenu --v2 --ts
How about a blank app?
ionic start myProject blank --v2 --ts
2. Add iOS / Android projects
Ionic should add at least one project for you (iOS or Android, depending on platform you’re running on).
However, to be sure you have all projects, type the following:
ionic platform add android
ionic platform add ios
3. Run it in the browser
ionic serve --lab
The –lab is optional but it makes the browser simulate both iOS and Android at the same time – kinda nifty!
That’s all folks!