In the previous chapter, we saw a basic implementation of navigation between two pages. In this section, we will dig deeper into the same.

To start off, we will scaffold a blank Ionic app. Create a new folder named chapter4 and, inside that folder, open a new command prompt/terminal and run the following:

ionic start -a "Example 9" -i app.example.nine example9 blank --v2

Once the app has been scaffolded, cd into the example9 folder. If we navigate to example9/src/app/app.component.ts, we should see the App component defined by a class named MyApp. And if we navigate to the corresponding template example9/src/app/app.html, we should see the ion-nav component.

The ion-nav component takes in an input property named root. The root ...

Get Learning Ionic - 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.