【发布时间】:2019-02-01 17:33:19
【问题描述】:
我想为特定组件隐藏 app.component.html 的一些行。
我有一些组件需要的底部导航栏。有些组件不应该显示导航栏。有什么方法可以将这些行隐藏在我的打字稿文件中的特定组件上?
app.component.html
<Gridlayout rows="*, auto">
<page-router-outlet row="0"></page-router-outlet>
<!-- Hide this -->
<BottomNavigation row="1">
// Code
</BottomNavigation>
</GridLayout>
【问题讨论】:
-
在服务中使用行为主体,您可以将其与 BottomNavigation 的可见性属性绑定。当您在组件之间导航时,根据需要通过服务切换此行为主题值。
标签: angular typescript nativescript