07.Setting the development environment
Setting the development environment
01. node –go https://nodejs.org/en/ and download, then install.
02. npm –when we install the
node , npm is also installed.
03. anguler CLI – npm install -g @angular/cli
To check: node –v Or node –version in CMD
Angular CLI provides command line tools start building fast, add components and tests,
and then instantly deploy.
We can use text editors like sublime, atom, visual studio code
etc...
Visual
studio code-https://code.visualstudio.com
04. ng new myApp - create your first Angular app.
05. cd myApp - Navigate to your app.
06. ng serve - Start your server to run app.
07. Creating a model – Example
: ng g m sample-module
ng generate module
<name> [options]
ng generate m
<name> [options]
ng g module <name>
[options]
ng g m <name>
[options]
08. Creating a component –
Example : ng g c sample-component
ng generate component
<name> [options]
ng generate c
<name> [options]
ng g component
<name> [options]
ng g c <name>
[options]
09. Service– Example : ng g s
sample-service
ng g s <name>[options]
10. Class – Example : ng g cl
sample-class
ng g cl <name>[options]
--type=model
11. Model class – Example : ng
g cl sample-model --type=model
ng g cl <name>[options]
--type=model
Comments
Post a Comment