Pre-requirement for the angular 5
1) node and npm
to check the node and the npm install in the system by two command
for node
node -v
for npm
npm -v
note for the ubuntu(i am using this)
1. sudo apt-get update
2. sudo apt-get install nodejs
3. sudo apt-get install npm
if the node is not install go to the nodejs official site and follow the instruction how to install nodejs in the your system os platform(ios,window,ubuntu,linux)
2) if the node and npm is install then we required the angular cli for that we have to run the
npm install @angular/cli -g
to check the angulat
ng -v or ng --version
it is display the angular version, node version and os platform information.
3) if all these are completed then we have to create the create project for that
1. ng new <project-name>
2. ng new <project-name> --routing
for the cli create the routing module and component (we learn later)
3. ng new <project-name> --style=css --routing
for the change the extension of the style sheet file default if is .scss format.
css3 is the scss previous is .sass
4) the boiler plate is create (initial code)
it create the <projectname>/src/
- app.routing.module.ts (if run the 2nd or 3rd command of 3rt point)
- app.module.ts
-app.component.html
-app.component.spec.ts
-app.component.ts
-app.component.scss/css
Tags:
Angular