According to this tutorial , my code is showing errors in Visual Studio Code. It showing errors for
`import {Page, NavController} from ‘ionic/ionic’;
@Page({
templateUrl: ‘app/hello-ionic/hello-ionic.html’
})
export class HelloIonicPage {
constructor(nav: NavController) {
this.nav = nav;
}
}`
However, if I change import to ‘ionic-framework/ionic’ and put private in front of nav variable name in constructor it seems to work. Is this correct?
`import {Page, NavController} from ‘ionic-framework/ionic’;
@Page({
templateUrl: ‘app/hello-ionic/hello-ionic.html’
})
export class HelloIonicPage {
constructor(private nav: NavController) {
this.nav = nav;
}
}`
reference: