Skip to content

sarveshhome/NativeScriptWithAngular

Repository files navigation

angular-nativescript-project

npm install -g @angular/cli

npm install -g @nativescript/schematics

npm install -g nativescript

ng new angular-nativescript-project

ng add @nativescript/schematics

or one line command

ng new --c=@nativescript/schematics --name=angular-nativescript-project --shared

ng g component about

ng g c contactus

ng serve

Run in Android

tns run android --bundle

tns run ios --bundle

Other useful command

tns platform add android

tns platform add ios

tns info

tns update

control

npm i nativescript-angular

npm i nativescript-ui-listview

For Textbox, label,radio button,

npm i nativescript-ui-dataform

For calender you can install this npm

npm i nativescript-ui-calendar

For different type of chart like lines, areas, bars, pies, and more you can install this npm

npm i nativescript-ui-chart

npm install nativescript-theme-core --save

For Web page run

Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

Code scaffolding

Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.

Build

Run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the --prod flag for a production build.

Running unit tests

Run ng test to execute the unit tests via Karma.

Running end-to-end tests

Run ng e2e to execute the end-to-end tests via Protractor.

Further help

To get more help on the sarvesh.

##For Android you can downloand android studio automatic emulator install and run with visual studio code