Angular 2 Hello world example


Angular 2 Hello world example

Let’s create Angular 2 Hello world example, here in this post i will explain how to create first Angular application and how to run it.

If you have installed Angular related dependencies like Angular CLI, Node.js and NPM then you can create application using ng new PROJECT_NAME command.

Follow below steps to create Angular application.

  1. Create Angular Project.
  2. Run Angular Server.
  3. Access Application.

Step 1 – Using ng new PROJECT_NAME command we can generate Angular application.

Angular 2 Hello world example

Note – Now Angular project created in F drive inside Angular folder.

Step 2 – Now start Angular npm server using npm start command.

Please make sure that you are in Angular project directory. Here you have to get in Angular folder inside HelloWorld folder.

How to start Angular server

Step 3 – Now we can access Angular application in any browser, By default Angular port number is 4200, So to access Angular application we have to type localhost:4200 in browser URL.

How to access Angular application

 






Full-stack web and mobile app development company Contact Us : Skype: indore.webcoder Email: info@w3sparks.com Sales: +91 8085506229