Sounds like you are missing an import somewhere for NavController:
import { NavController } from 'ionic-angular';
If you post more of your code where the error is occurring we could be more helpful.
thx for your reply
My purpose is to pass the data of a connected user from the loginService to the sideMenu, which is actually in the app.html, so because I’m little bit new with ionic2 and I don’t have many ideas about him haul arcitecture. So I inject a service in /app/app.component.ts and I tried to retrieve the user picture
@Component({
templateUrl: ‘app.html’,
providers:[SocketService, LoginService]
})
export class MyApp {
@ViewChild(Nav) nav: Nav;
user: any;
rootPage: any=Login;
pages: Array<{title: string, component: any}>;
constructor(public platform: Platform, public socket: SocketService, public _loginService: LoginService) {
this.user=_loginService.getUser();
alert(this.user);
Unless you’re absolutely sure of what you’re doing and why, don’t declare providers in components, only in the app module.
@rapropos is right. You should also take a look at the conference app example. I believe they do something similar to what you are attempting to do. If you still need more help you’d need to post more of your code.