Ionic navigation
In this section, we are going to take a look at Ionic navigation. We are going to scaffold a blank template, and then add more pages and see how to navigate between them.
Ionic 3 has introduced the @IonicPage
decorator for simplified and improved navigation, centered around native mobile experience. Do check out Chapter 11, Ionic 3 for this.
Basic navigation
To get started, we scaffold a new project. Run the following:
ionic start -a "Example 8" -i app.example.eight example8 blank --v2
Run the Ionic app using the ionic serve
command and you should see the home page of the blank template.
Navigation in Ionic does not require URLs; instead, pages are pushed and popped from the navigation controller's page stack. This approach is very much in line with how one would achieve navigation in a native mobile app, when compared to browser-based navigation. You can, however, deeplink pages with URLs, but that does not define the navigation.
To understand basic navigation, we open the src...