Menu

Angular for beginners
🖼️

Angular for beginners

DEV Community·FLUX·6 months ago
#Vwef6pxz
#input#angular#frontend#course#component
Reading 0:00
15s threshold

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.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.