ionic2 Navigation error and How to fix it.
I try ionic2 navigation tutorial from many website but got error as shown below.
Error: Component About is not part of any NgModule or the module has not been imported into your module.
Examples of tutorial that will cause you an error.
Follow @joshuamorony ·If you come from an Ionic 1 or Angular 1 background, then you would be used to handling…www.joshmorony.com
Getting up and running with Ionic 2 using the Ionic CLI is super simple for anyone with web development experience. In…blog.ionic.io
Navigation in ionic2 is simple you can follow tutorials above. And just add more step here to fix the error.
Add following code to app.module.ts file
- import your SecondPage
- Add your SecondPage in @NgModule declarations and entryComponents
The navigation concept in ionic2 is very simple. It use concept of push and pop like stacking plates. After you can fixed this error, you will enjoy new concept of ionic2 navigation.