当前位置: 首页 > 软件库 > 手机/移动开发 > >

nativescript-rootlayout-demo

授权协议 Readme
开发语言 JavaScript TypeScript
所属分类 手机/移动开发
软件类型 开源软件
地区 不详
投 递 者 祁默
操作系统 iOS
开源组织
适用人群 未知
 软件概览

RootLayout Demo

�� Demo for Nativescript 8's RootLayout Component

Development

This app is built with the NativeScript CLI. Once you have the CLI installed, start by cloning the repo:

git clone https://github.com/williamjuan027/nativescript-rootlayout-demo.git

cd nativescript-rootlayout-demo/demo-ng

Install the project's dependencies

npm install

You can then run the app on iOS and Android using the following commands:

npm run start.ios

npm run start.android

This app uses the new RootLayout component from Nativescript 8 which is still curently in alpha, make sure that the latest Nativescript alpha is installed prior to running the app

npm install -g nativescript@alpha

How to Use RootLayout

RootLayout is meant to be used as the outermost container for your app. In Angular, this refers to the layout in your app.component.html which contains your page-router-outlet and other UI elements.

<!-- app.component.html -->
<RootLayout>
  <page-router-outlet></page-router-outlet>
</RootLayout>

RootLayout related functionalities are handled in ui.service.ts

RootLayout Methods

getRootLayout() returns the RootLayout instance which has the following methods:

Method Description
open(view: View, options?: RootLayoutOptions): Promise Opens the target view
close(view: View, exitTo?: TransitionAnimation): Promise Closes the target view
bringToFront(view: View, animated?: boolean): Promise Moves the target view to the front (highest z-index)
getShadeCover(): View Returns the shade cover instance
 相关资料
  • NativeScript 可以使用 Javascript,CSS, XML 创建真正的 Native 跨平台应用,支持 iOS Android,NativeScript 将您的跨平台代码翻译成目标平台的代码。 UI 使用 XML 描述,CSS 样式,在编译时将 UI 转化成本地原生代码,最终得到正在的 Native 原生应用。 Telerik 公开了用于创建安卓、iOS和Windows Unive

  • nativescript-rivescript-demo [v0.1.0] This repo is a demo to show the power of NativeScript + RiveScript Screenshots Installation npm itns run android (or ios) Usage Just chat with that bot, using the

  • Movies Demo �� Demo for Nativescript Angular Speed Code Youtube Series Development This app is built with the NativeScript CLI. Once you have the CLI installed, start by cloning the repo: This app use

  • NativeScript Command-Line Interface The NativeScript CLI lets you create, build, and deploy NativeScript-based apps on iOS and Android devices. Get it using: npm install -g nativescript What is Native

  • NativeScript-Snackbar �� �� �� NativeScript plugin for Material Design SnackBar component. Installation: NativeScript 7+:tns plugin add @nstudio/nativescript-snackbar NativeScript version prior to 7:t

  • Nativescript-Ripple This plugin aims to bring a native (or close to native) ripple implementation on Android and iOS. The android version uses a RippleDrawable and conserves the previous background, a