Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning Ionic

You're reading from   Learning Ionic Discover a simpler approach to modern mobile application development with Ionic framework and learn how to create elegant hybrid apps with HTML5 and AngularJS

Arrow left icon
Product type Paperback
Published in Jul 2015
Publisher
ISBN-13 9781783552603
Length 388 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Arvind Ravulavaru Arvind Ravulavaru
Author Profile Icon Arvind Ravulavaru
Arvind Ravulavaru
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. Ionic – Powered by AngularJS FREE CHAPTER 2. Welcome to Ionic 3. Ionic CSS Components and Navigation 4. Ionic and SCSS 5. Ionic Directives and Services 6. Building a Bookstore App 7. Cordova and ngCordova 8. Building a Messaging App 9. Releasing the Ionic App A. Additional Topics and Tips Index

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

Note

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...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime