Today, we will learn how to create our first angular application.
Before creating our first angular application, there are some prerequisites
required to be installed in our development environment.
Prequisites
1.
Node.js
Node.js needs to be installed on
development system. To install latest node.js follow this link https://nodejs.org/en/download/
Check installed node version using command
node
-v
2.
NPM
NPM is installed with node.js
Check installed npm version using command
npm
-v
3. Visual Studio Code
We can use any development IDE but I prefer Visual Studio Code. You can download latest VS Code from this link https://code.visualstudio.com/
We can use any development IDE but I prefer Visual Studio Code. You can download latest VS Code from this link https://code.visualstudio.com/
4.
Angular-CLI
Latest version of Angular-CLI needs to be
installed. To install angular-cli use the following command
npm
install -g @angular/cli
Use following command to get installed version of all above with additional useful packages that produce following output
ng -v
Now we have setup our angular development environment. Let’s
start our first application
Creating
our first application
We can create our new angular project using angular-cli
command:
ng new my-first-app
It will take some time to automatically create our first
angular application.
Following is the application structure developed by
angular-cli.
Out of these, we mostly use app folder.
Now we can run our app using angular-cli command
ng serve –o
The app will start compiling and then run in http://localhost:4200
Nice Article! Very useful Content for new learner i really loved this.
ReplyDelete