angular - 如何从应用程序中删除操作栏?
问题描述
我正在尝试从使用 NativeScript 开发的应用程序中删除操作栏,我删除了与操作栏相关的所有代码(html 和 css 代码),但它继续出现在应用程序上。
HTML:
<ScrollView>
<StackLayout class="page p-t-15">
<Image src="~/app/img/logo.png" ></Image>
<Label class="m-t-10 text-center" text="Login" label.Alignment = "top";></Label>
<TextField class="m-t-10 m-b-10 m-l-15 m-r-15" hint="Email Address" keyboardType="email" autocorrect="false" autocapitalization="none"
[(ngModel)]="email"></TextField>
<TextField class="m-t-10 m-b-10 m-l-15 m-r-15" hint="Password" secure="true" autocorrect="false" autocapitalization="none"
[(ngModel)]="password"></TextField>
<Button class="btn btn-primary" text="SIGN IN" (tap)="onSigninButtonTap()"></Button>
<Label class="m-t-10 text-center" text="______ or ______"></Label>
<Button class="btn btn-outline" (tap)="onLoginWithSocialProviderButtonTap()" text="Log in with Social Provider"></Button>
<Label class="m-t-10 m-b-10 m-l-15 m-r-15" text="Forgot password?" (tap)="onForgotPasswordTap()"></Label>
<Label class="m-t-10 m-b-10 m-l-15 m-r-15" text="Não tem conta?" (tap)="onNaoTemContaTap()"></Label>
<Button class="btn btn-primary" text="Sign UP" [nsRouterLink]="['/browse']" pageTransition="slide" clearHistory="true"></Button>
</StackLayout>
</ScrollView>
CSS:
StackLayout {
height: 100%;
width: 100%;
background-image: linear-gradient(#000000,#439B9B , #000000);
}
解决方案
使用 NativeScript 5.0,您可以actionBarVisibility
在Frame
组件上拥有一个新属性。您可以将其设置为,never
并且您将永远不会ActionBar
在此导航的页面中看到Frame
。它消除了ActionBar
在每个页面上手动隐藏的需要。
page-router-outlet
Angular中的组件公开了相同的属性。
推荐阅读
- reactjs - 如何基于 react-scripts 库将反应应用程序构建到一个捆绑包 .js?
- algorithm - 计算网络的最大流量
- numpy - 计算多维数据数组中某个值的百分位排名
- arrays - 如何将所有值从 Vector 传递给 Sub?
- reactjs - 如何使用我的函数组件道具通过 usestate() 设置我的状态?
- apache-spark - Graphframes:Spark Graphframes 中两个顶点列表之间的 BFS
- react-native - 如何在 React Native 中同时获得按钮单击导航和触摸滑动导航?
- javascript - 如何将我创建的文件导出到我的 app.js
- typescript - 为什么 TypeScript 不正确返回被覆盖的方法,即使它不可访问?
- dialogflow-es - Intent 检测正则表达式实体