Skip to content

nscript-cn/nativescript-angular

This branch is 832 commits behind NativeScript/nativescript-angular:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

b95184f · Sep 18, 2017
May 17, 2016
Jul 3, 2017
Sep 13, 2016
Sep 14, 2017
Sep 18, 2017
Sep 14, 2017
Sep 18, 2017
May 17, 2016
Dec 4, 2015
Sep 14, 2017
Sep 7, 2017
Aug 10, 2017
Sep 11, 2015
Jan 27, 2016
Apr 13, 2017
Apr 3, 2017
Dec 15, 2016

Repository files navigation

Build Status

Integrating NativeScript with Angular.

Running locally

Prerequisites

Install your native toolchain and NativeScript as described in the docs:

https://docs.nativescript.org/setup/quick-setup

Install dependencies

$ cd nativescript-angular
$ npm install

Run the sample application (ng-sample)

Install NPM packages (use the local copy of nativescript-angular):

$ cd ng-sample
$ npm install
$ npm install ../nativescript-angular

Start the app:

$ tns run android
$ tns run ios

Running the tests

Install NPM packages (use the local copy of nativescript-angular):

$ cd tests
$ npm install
$ npm install ../nativescript-angular

Start test run:

$ tns test ios --emulator
$ tns test android --emulator

Developer workflow:

Setup:

Use npm link to link nativescript-angular in tests and ng-sample progects:

cd nativescript-angular
npm link
cd ../ng-sample
npm link nativescript-angular
cd ../tests
npm link nativescript-angular

Work

  1. Make changes to the test, ng-sample projects or in nativescript-angular folder.
  2. Run the tests or ng-sample using as shown above.

Watch the video explaining Angular and NativeScript

NativeScript session on AngularConnect conference

Explore the examples

The ng-sample app is meant for testing stuff while developing the renderer code, and isn't the best example out there. You can take a look at these sample apps that use the published builds from npm:

Known issues

  1. There are certain issues with the Parse5DomAdapter and we'll likely need to provide our own later on:
  • Self-closing elements (<Label text="Name" /><Button text="Save" />) get parsed wrong (in this case Button gets parsed as a Label child.

Packages

No packages published

Languages

  • TypeScript 92.6%
  • HTML 3.7%
  • JavaScript 2.7%
  • CSS 0.6%
  • Shell 0.2%
  • Makefile 0.2%