Create a new Angular Application in easy way

Learn to Growing

--

Angular is an open-source, JavaScript framework written in TypeScript. Google maintains it, and its primary purpose is to develop single-page applications. As a framework, Angular has clear advantages while also providing a standard structure for developers to work with.

Why angular is more powerful?

  • Single Page application
  • TypeScript
  • Angular CLI
  • Dependency injection
  • Two-way data binding
  • Routing with @angular/router
  • Forms with @angular/forms
  • XSS protection
  • HTML templates
  • Component CSS encapsulation

What are the Steps to create application?

  • Install nodejs@13.0.0 & it will install npm@8.1.2
  • node -v
v16.13.1
  • npm -v
8.1.2
  • npm install -g @angular/cli@13.0.0
  • ng version
     _                      _                 ____ _     ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/


Angular CLI: 13.0.0
Node: 16.13.1
Package Manager: npm 8.1.2
OS: win32 x64

Angular:
...

Package Version
------------------------------------------------------
@angular-devkit/architect 0.1300.0 (cli-only)
@angular-devkit/core 13.0.0 (cli-only)
@angular-devkit/schematics 13.0.0 (cli-only)
@schematics/angular 13.0.0 (cli-only)

How to create new angular application using Angular CLI command ?

ng new demo-angular-app 
Would you like to add Angular routing? (y/N)
Which stylesheet format would you like to use?
CSS
SCSS[ https://sass-lang.com/documentation/syntax#scss ]
Sass[ https://sass-lang.com/documentation/syntax#the-indented syntax ]
Less[ http://lesscss.org ]

How to run the angular application?

Once we follow the above steps the angular application will open and you can able to see the angular folders.

Visual Studio code is a best angular platform for development. Open the angular folder and run the below command.

ng serve

Open the browser and try http://localhost:4200/

Hope this helps to start your journey in Angular!!!!

Sign up to discover human stories that deepen your understanding of the world.

--

--

Learn to Growing
Learn to Growing

No responses yet

Write a response