NativeScript+;不使用仿真器的Angular应用程序

NativeScript+;不使用仿真器的Angular应用程序,angular,android-actionbar,emulation,nativescript,Angular,Android Actionbar,Emulation,Nativescript,我想问一下,是否还有其他人有我现在遇到的这个问题。当通过NativeScript Playerd运行我的应用程序或使用我自己的手机时,ActionBar不会隐藏,即使我使用hideActionBar行。我不知道这是否发生了,因为我使用的是安卓系统,但这里是我想要实现的和我现在得到的截图 HTML <Page xmlns="http://www.nativescript.org/tns.xsd" actionBarHidden="true" class="welcome"> &

我想问一下,是否还有其他人有我现在遇到的这个问题。当通过NativeScript Playerd运行我的应用程序或使用我自己的手机时,ActionBar不会隐藏,即使我使用hideActionBar行。我不知道这是否发生了,因为我使用的是安卓系统,但这里是我想要实现的和我现在得到的截图

HTML

<Page xmlns="http://www.nativescript.org/tns.xsd" actionBarHidden="true" class="welcome">
    <GridLayout class="firstLayout" columns="*" rows="*, *, *" backgroundColor="green">

        <GridLayout row="0" columns="*" rows="60pt,auto, auto">
            <Image src="~/images/logo-icon.png" class="logo" row="1" width="65pt"></Image>
            <Label text="JOURNEY" class="text1" row="2" horizontalAlignment="center" verticalAlignment="middle"></Label>
        </GridLayout>

        <GridLayout row="1" columns="*" rows="auto, auto" verticalAlignment="center">
            <Label text="This app is designed for your. Journey will be" class="text2" row="0"></Label >
            <Label text="your guide." class="text3" row="1" ></Label >
        </GridLayout>

        <GridLayout row="2"  columns="*" rows="auto, auto, auto" verticalAlignment="bottom">
            <Button text="visitor login" class="buttonVL btn-active" id="button" (tap)="onButtonTapA()" row="0"></Button>
            <Label text="already a member?" class="text4" row="1"></Label >
            <Button text="login" class="buttonL" (tap)="onButtonTapB()" row="2" ></Button>
        </GridLayout>

    </GridLayout>
</Page>

尝试使用
this.page.actionBarHidden=true。它在iOS和Android设备上都对我有效

请参见以下示例:

import { Component, OnInit } from '@angular/core';
import { Page } from 'tns-core-modules/ui/page';

@Component({
  moduleId: module.id,
  selector: 'app-welcome',
  templateUrl: './welcome.component.html',
  styleUrls: ['./welcome.component.scss']
})
export class WelcomeComponent implements OnInit {

  constructor(private page: Page) { }

  ngOnInit() {
    this.page.actionBarHidden = true;
  }
}

尝试使用
this.page.actionBarHidden=true。它在iOS和Android设备上都对我有效

请参见以下示例:

import { Component, OnInit } from '@angular/core';
import { Page } from 'tns-core-modules/ui/page';

@Component({
  moduleId: module.id,
  selector: 'app-welcome',
  templateUrl: './welcome.component.html',
  styleUrls: ['./welcome.component.scss']
})
export class WelcomeComponent implements OnInit {

  constructor(private page: Page) { }

  ngOnInit() {
    this.page.actionBarHidden = true;
  }
}

在ts文件中,导入
页面

import { Page } from "ui/page";
和在构造函数中

constructor(private page: Page){}
在ngOnInit()中


在ts文件中,导入
页面

import { Page } from "ui/page";
和在构造函数中

constructor(private page: Page){}
在ngOnInit()中


在这个组件上发布你的代码,PLS在这个组件上发布你的代码,plsIt在Android和iOS中对我有效,但在尝试在Web上运行angular应用时不起作用它在Android和iOS中对我有效,但在尝试在Web上运行angular应用时不起作用