Company
Date Published
Author
Andrew McGivery My name is Andrew McGivery. I ...
Word count
474
Language
English
Hacker News points
None

Summary

Andrew McGivery's article provides a step-by-step guide to adding pages and navigation in an Ionic 2 application using the Ionic CLI, building on the basics covered in a previous tutorial about creating a simple app. The process begins by creating an app with a blank template, followed by generating a new page using the CLI, which automatically creates the necessary HTML, TypeScript, and SCSS files. To enable navigation from the home page to the newly created "about" page, developers must import the AboutPage class into the home.ts file and use a constructor in the HomePage class to bind the AboutPage to a property. This property is then used in the home template to create a button with NavPush functionality, while additional content is added to the about template. Running ionic serve allows developers to view and test the app in a browser, demonstrating how the Ionic CLI can simplify the process of rapidly developing and adding new components to applications.