Ionic 2:有没有办法在不是标签子项的页面上显示标签?

时间:2016-10-03 03:23:24

标签: angular ionic2

我有要在每个页面上显示的标签,但似乎我只能在标签的子页面上显示标签。有没有办法解决这个问题?

1 个答案:

答案 0 :(得分:0)

有一些讨论here

我更喜欢的解决方案之一是:

i < 5

如果要显示某个视图,则使用ionViewWillEnter() { let tabs = document.querySelectorAll('.tabbar'); if ( tabs !== null ) { Object.keys(tabs).map((key) => { tabs[ key ].style.transform = 'translateY(56px)'; }); } // end if } ionViewDidLeave() { let tabs = document.querySelectorAll('.tabbar'); if ( tabs !== null ) { Object.keys(tabs).map((key) => { tabs[ key ].style.transform = 'translateY(0)'; }); } // end if } 隐藏选项卡。回去时展示它们。