简体   繁体   English

有关Nativescript + Angular2开发的多个问题

[英]Multiple questions about Nativescript + Angular2 development

I have multiple questions about development that's I find very hard to find in forums and most of the time not being noticed on chat rooms: 我有很多关于开发的问题,我很难在论坛上找到它,并且在大多数情况下在聊天室中都没有注意到:

  • How do I receive parameter from a route? 如何从路由接收参数? This one is very hard to find.. 这个很难找到。

  • How to remove Action Bar throughout the Android part of things, tried but failed: 如何在整个Android部分中删除操作栏,但尝试失败:

    Nativescript android remove action bar Nativescript Android删除操作栏

  • How to center the text inside the label vertically, tried vertical-align: middle and vertical-align: middle but both 如何在标签内部垂直居中放置文本,尝试了vertical-align:middle和vertical-align:middle但都

Please help. 请帮忙。 Thank you. 谢谢。 :) :)

In regard to your first question, you could review this angular article, where have been shown how to send parameters via angular router. 关于第一个问题,您可以查看这篇角度文章, 文章已展示了如何通过角度路由器发送参数。

In case you want to hide the ActionBar you could set startPageActionBarHidden property to true in your main.ts For example: 如果你要隐藏的ActionBar ,你可以设置startPageActionBarHidden属性为true在你main.ts例如:

main.ts

import {nativeScriptBootstrap} from "nativescript-angular/application";
import {AppComponent} from "./app.component";
import { NS_ROUTER_PROVIDERS } from "nativescript-angular/router";

nativeScriptBootstrap(AppComponent,[NS_ROUTER_PROVIDERS],{ startPageActionBarHidden: true });

About your last question, you could use vertical-align for the Label in your css file. 关于您的最后一个问题,您可以在css文件中对Label使用vertical-align

app.css

label{
    vertical-align: center;
}

I hope this is applicable for you. 希望这对您适用。 However it would help if you could give me more info about your problem. 但是,如果您可以给我更多有关您的问题的信息,这将有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM