To eliminate errors while generating pages using ionic 2 generate


I had created an app using --ts option. When I generate pages however the resulting file is a javascript and it has errors starting with the import statement which references ‘ionic/ionic’ rather than ionic-framework. I made the change and then renamed the file to .ts and it eliminated the import errors. I also declared a ‘nav:NavController’ to eliminate the error in ‘this.nav = nav’.

I don’t know if there is an option to generate a .ts file.