ionic framework - getting Nav as undefined in root page -


i upgraded ionic 2 ionic 3. upgraded, getting nav undefined in root page.

//app.component.ts import { component, viewchild, renderer } '@angular/core'; import { platform, nav, menucontroller } 'ionic-angular'; @component({   templateurl: `app.html` }) export class myapp {    @viewchild(nav) nav : navcontroller ;   rootpage: any;   authhandler : any;   pages: array<{title: string, component: any, icon: string}>;   urls: array<{title: string, url: string, icon: string}>;   contact: array<{title: string, url: string, icon: string}>;    constructor(public platform: platform,               public renderer : renderer,               public menu: menucontroller,               public loginservice : loginservice,               public util : utilityservice,               public statusbar: statusbar,               public keyboard: keyboard) {     this.initializeapp();     console.log("this nav object :: ", this.nav); }  //app.html <ion-nav [root]="rootpage" #content swipebackenabled="false"></ion-nav> 

output in console:

this nav object ::  undefined 

is changed in ionic 3 have in order make work?


Comments

Popular posts from this blog

c# - Update a combobox from a presenter (MVP) -

How to understand 2 main() functions after using uftrace to profile the C++ program? -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -