Setup
The command below will install Angular with global access.
npm install - g @ angular /cl i
Enter fullscreen mode
Exit fullscreen mode
Why ?
Helps us scaffold the angular like creating new project, component, serving the application, building, etc.
# creating angular project named ' angular101 ' ng new angular101
Enter fullscreen mode
Exit fullscreen mode
According to your preferences select the options and you should get the project folder ready with name you had in your cli.
Running the project locally
# go to the directory cd angular101
# start / run the angular project npm start
Enter fullscreen mode
Exit fullscreen mode
We have our application running on ' http://localhost:4200 ' Under the hood we have 'ng serve' that runs the application ( to be angular specific )
Component
Angular follows component based architecture and these components are re-usable components with class based programming.
We use decorator '@Component' that turns a simple class into a component.…