Short description of the problem:
Error: Property 'nav' does not exist on type 'AnyPage'.
What behavior are you expecting?
How can I get rid of this error on all code editors and IDEs as well as on compile and ionic serve?
Steps to reproduce:
- just generate a page
- run ionic serve
- you will see the error of the nav but the nav is working
ERROR in [default] /.../app/pages/home-page/home-page.ts:15:9
Property 'nav' does not exist on type 'HomePage'.
Problem with generated code:
constructor(@Inject(NavController) nav) {
this.nav = nav;//this line throw errors on all Editors and IDEs and on Terminal
}
Ionic Version: 2.0.0-beta.2
Browser & Operating System: iOS / Android / Chrome
Terminal
Run ionic info from terminal/cmd prompt:
Cordova CLI: 6.0.0
Ionic Version: 2.0.0-beta.2
Ionic CLI Version: 2.0.0-beta.19
Ionic App Lib Version: 2.0.0-beta.9
ios-deploy version: 1.8.5
ios-sim version: 5.0.6
OS: Mac OS X El Capitan
Node Version: v4.3.2
Xcode version: Xcode 7.2.1 Build version 7C1002