Angular 5 Learning Experience — Part 5

Kathiravan
1 min readJul 9, 2018

--

Start Building App

This is continuation of previous parts i published . This post we will see how to build a default app with angular-cli

  1. make sure nodejs and npm isinstalled. node -v & npm -v will show the version installed
  2. npm install @angular/cli -g
  3. ng new calapp — style=scss — routing (calapp is the appname)
  4. cd calapp
  5. ng serve ( app will run on port http://localhost:4200 default)
  6. code . ( to open VScode if u installed already)
  7. In VS you can see the default code generated and reflect below structure
Default generated Structure

8) Change src\app\app.component.html and see changes on browser by hitting http://localhost:4200 (ng serve) should be running

Few other useful commands from ng

  1. ng -v ( will show version)
  2. ng generate component <<componentname>> ( to generate new component
  3. ng generate module <<module name>>
  4. ng build --env prod ( for building prod release

Stay tuned for next post

--

--

Kathiravan
Kathiravan

No responses yet