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.
- Create Angular Project.
- Run Angular Server.
- Access Application.
Step 1 – Using
ng new PROJECT_NAME command we can generate Angular application.
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.
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.