导航选项卡获取TypeError:无法读取属性

时间:2018-06-21 15:25:47

标签: angular typescript ionic-framework ionic2 angular4-router

我无法从一页导航到另一页。 出现错误:

  

错误:未捕获(承诺):TypeError:无法读取属性   未定义TypeError的'_willLeave':无法读取属性'_willLeave'   未定义       在http://localhost:8100/build/vendor.js:58523:32,我有一系列的页面:

 pages = [
    { pageName: 'ListPage', title: 'Before', icon: 'flame', id: 'before'},
    { pageName: 'Stage1Page', title: 'After', icon: 'help-circle', id: 'AfterTab'},
    { pageName: 'NewsPage', title: 'Profit', icon: 'body', id: 'ProfitTab'},
  ];

和HTML:

 <super-tabs tabsPlacement="top" toolbarBackground="secondary" toolbarColor="light" indicatorColor="light"
  (tabSelect)="onTabSelect($event)">
  <super-tab *ngFor="let page of pages" [root]="page?.pageName" [icon]="page?.icon" [id]="page?.id"></super-tab>
</super-tabs>

**     我看到标签一秒钟,然后我得到了错误。当我移至下一个标签时。

我只需要简单的导航。我该怎么办?
谢谢!

0 个答案:

没有答案