Unexpected token while trying to inject NavController

`import {Page, NavController} from ‘ionic-framework/ionic’;
import {Signup} from ‘…/signup/signup’;
import {Pass} from ‘…/pass/pass’

templateUrl: ‘build/pages/login/login.html’
export class Login {
constructor(nav: NavController){




Dependency injection is not working, i get this error

This has been answered on other thread.

Check This discussion here

Basically, nav: NavController is used in TypeScript and you are only using Javascript.
If you got that from example scattered on internet, probably those example are based on older build of Ionic2.


1 Like

solved my issue many thanks

It was error due to changing the ionic 2 beta specification, earlier beta version using the typescript. Now its move on with babel JS you have to inject controls as following way

export class Login {
static get parameters(){
return [[NavController]];
this.nav = nav;