Now, we will create our first Angular application. I have created a folder Angular-Projects. In command prompt go to this folder location.
Type the command ng new my-first-app –no-strict
Press Enter. This will create new Angular project. This will ask you couple of questions. Would you like to add Angular routing? type N and enter. We will explore routing part later. Select the default CSS style option. By default CSS style is selected. So, just click on Enter Wait for some time. Project will be created.
strict mode is a special mode in which we can create our project. As of now, we will not use strict mode. That’s why I have used –no-strict parameter. Strict mode improves maintainability and helps you catch bugs ahead of time. Additionally, strict mode applications are easier to statically analyze and can help the ng update command refactor code more safely and precisely when you are updating to future versions of Angular.
Now folder named my-first-app has been created.
Now, in command prompt, go to the folder my-first-app and then run the command ng serve
This will run the angular application.
Go to browser, use the URL http://localhost:4200 By default Angular application runs on port 4200
In the browser, you should see somewhat similar. This interface might change depend upon latest angular versions.