How to create and run angular project in easy steps


Using Angular CLI we can quickly create project with new command. Before that make sure you have

  1. npm
  2. angular CLI

preinstalled on your system. For better understanding of angular project structure I suggest the following post

Install CLI

If you already have the angular CLI installed , skip this step

npm install @angular/cli

Inline template and Style

Every Angular component have three parts, template, component itself and style. These are generally located in three separate files. Optionally we can use inline template and styles.

Create the project

For inline template driven project use the following syntax on your terminal

ng new project-name -it -is

For bigger projects I suggest standard option

ng new project-name

Run the project

To run the project use either npm or ng command.

npm start
ng serve -o

Don’t forget to visit the source code page

Published by

Manoj

A developer,teacher and a blogger obsessed with Python,Dart and open source world from India

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.