Ionic 2 getComponent alternative

后端 未结 1 1804
自闭症患者
自闭症患者 2021-01-27 12:01

Since getComponent is no longer available i have the next scenario.

Inside app.ts and app.html i have a menu component and a nav component. Inside the nav component i am

1条回答
  •  时光取名叫无心
    2021-01-27 12:37

    Variables queried by @ViewChild() and @ViewChildren() are not initialized before ngAfterViewInit() was called. If you refer to tabs in the constructor or ngOnInit() it will be null.

    0 讨论(0)
提交回复
热议问题