Hi @mhartington,
What happend was
- I created a normal v2 project
ionic start demoProject blank --v2
- it created me a home component
- then I tried to add NavController
#home.js
import {Page, NavController} from 'ionic-framework/ionic';
@Page({
templateUrl: 'build/pages/home/home.html'
})
export class HomePage {
constructor(nav: NavController){
}
}
- I got the following error,
ERROR in ./app/pages/home/home.js
Module build failed: SyntaxError: /<path>/app/pages/home/home.js: Unexpected token (9:17)
7 |
8 | export class HomePage {
> 9 | constructor(nav: NavController){
| ^
10 |
11 | }
12 | }
- So I found this discussion, and when I changed the file to
.ts
, and that made the above error go away. Thats what made me think, this is a.ts
file
cheers