Book Image

Learning Ionic

By : Arvind Ravulavaru
Book Image

Learning Ionic

By: Arvind Ravulavaru

Overview of this book

Table of Contents (19 chapters)
Learning Ionic
About the Author
About the Reviewers

Testing the application

Now that we are done with building the application, we will add the iOS and Android platforms, to test the application. Run this:

ionic platform add ios
ionic platform add android

Next, we will emulate/run the app. I have a Samsung Galaxy Note 3 mobile as one device and an iOS emulator as another device.

I have tested the app by running it on the Android device and emulating it on the iOS emulator. You can do so the same way or you can use an Android emulator and an iOS emulator for test purposes as well. To launch/emulate the application, run this:

ionic run android –l –c

You can also use this:

ionic emulate ios –l –c


The –l flag sets up the live reload option when emulating/running on an emulator/device and the –c flag enables JavaScript console logs to be printed in a command prompt/terminal. These are the two of the most helpful flags while debugging Ionic apps on emulators/devices.

Once the app is launched in both the devices, you should see the main page of...