GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - PAT-Development/nativescript-angular: Integrating NativeScript with Angular 2

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

591 Commits
591 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
doc
doc
 
 
ng-sample
ng-sample
 
 
src
src
 
 
startup-test
startup-test
 
 
tests
tests
 
 
typings
typings
 
 
web
web
 
 
.ctags-exclude
.ctags-exclude
 
 
.eslintrc.json
.eslintrc.json
 
 
.gitignore
.gitignore
 
 
.travis.yml
.travis.yml
 
 
DEVELOPERS.md
DEVELOPERS.md
 
 
LICENSE
LICENSE
 
 
NativeScript-dependencies.md
NativeScript-dependencies.md
 
 
README.md
README.md
 
 
gruntfile.js
gruntfile.js
 
 
package.json
package.json
 
 
tsconfig.json
tsconfig.json
 
 

Repository files navigation

Build Status

Integrating NativeScript with Angular 2.

Running locally

Prerequisites

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

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

Install dependencies

$ npm install -g grunt-cli gulp

Then install the needed NPM packages:

$ npm install

Compile and prepare NativeScript and Angular

$ grunt

Initialize the test NativeScript app (ng-sample)

$ cd ng-sample
$ npm install

The latter installs the angular2 and tns-core-modules packages that you just built by running grunt prepare step in the project root.

Run the ng-sample app

$ tns run android
$ tns run ios

(Optional) Webpack bundling

Install the webpack tool:

$ npm install -g webpack

Enable the webpack hook by setting the WEBPACK_BUILD environment variable. You can do it with a single command on OSX/Linux using:

$ env WEBPACK_BUILD=1 tns run android

Running the tests

$ cd tests
$ npm install
$ tns test ios --emulator

Developer workflow:

  1. Make changes to src/nativescript-angular, and rebuild with grunt build. If succesful, you should get a npm package in the project root.
  2. Navigate to the ng-sample subdir: $ cd ng-sample. Make some changes to the app or ../src/nativescript-angular.
  3. Run with $ tns run android or $ tns run ios

Note that you should never change files in ng-sample/src/nativescript-angular/ as they are overwritten with the reference sources in src/nativescript-angular on every grunt app run.

Watch the video explaining Angular 2 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:

  • Hello world starter
  • TodoMVC sample implementation

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.

About

Integrating NativeScript with Angular 2

t.co/6PRfmyUkJd

Resources

Readme
License

Contributing

Contributing
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.