Viewing the app using your web browser
In order to run the web app, you need to turn your /www
folder into a web server. Again, there are many methods to do this and people tend to stick with one or two ways to keep things simple. A few other options are unreliable, such as Sublime Text's live watch package or static page generator (for example, the Jekyll and Middleman apps). They are slow to detect changes and may freeze your IDE. So those won't be mentioned here.
Getting ready
The recommended method is to use the ionic serve
command line. It basically launches an HTTP server so that you can open your app in a desktop browser.
How to do it…
- First, you need to be in the
project
folder. Let's assume that it is the Side Menu HelloWorld:$ cd HelloWorld_Sidemenu ...
Get Ionic 2 Cookbook - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.