In this chapter, we are going to learn how to test and run our Ionic application using various methods. We will start by learning to test our application using the simplest Ionic technique: by serving our app to the Chrome browser using the ionic serve
command. We will then go ahead and use the Ionic view mobile app for iOS/Android to see how we can test our application on a mobile device. Lastly, we will learn to run and deploy our Ionic application to a mobile device using the traditional build system of the native SDKs of our respective platforms.
You're reading from Ionic Framework By Example
In the last chapter, we created our first Ionic application using the Ionic blank template. We worked on the application further, and made a to-do list app. We wrote some Angular code and had some initial exposure to some Ionic code. However, we did not get to see our application in action. There are many ways by which we can run an Ionic app, and the first technique we will be learning is the ionic serve
technique.
The ionic serve
technique is the simplest way to see your app in action. It requires no extra setup after the Ionic CLI, and only requires you to have a web browser. We are now going to test our todo
application, which we created in the preceding chapter using the ionic serve
technique. To test your application with this technique, simply open a new command-line window and follow the following steps.
In this chapter, we learned the various ways to test and deploy our app. We started off by using the ionic serve
command to deploy our app to the browser using Chrome. We then had a look at how we can also serve our application using Ionic labs. We then went ahead to use the Ionic view application to see how we can run our app on an iOS and Android device with the Ionic view app installed in it. Lastly, we touched on how we can actually run our Ionic application on a real Android or iOS device.
In the next chapter, we are going to dive into some more complex Ionic controls, and we will get to use Angular's $http
service to see how we can make Ajax calls and retrieve data within our Ionic application.