If you have already worked with angular previously you know, angular CLI helps us to build an angular application. Creating a new project in angular is now as simple as installing the Angular CLI and running the ng new command.
What is Angular CLI
The Angular CLI helps us to create an Angular application and it uses Typescript, it creates an angular application with all the configuration files and the packages in one single command.
It helps us to add features (components, pipe, services, directives, etc.) to existing or new Angular applications.
How to create a new Angular 15 project
To create a new angular 15 project, first we need to set up the system environment
Installing Visual Studio Code
We need an editor to create the application so for that we need to install VS code. It is easy to install and helps us to create an angular application easily. You can download Visual Studio Code from the following link.
Node.Js
Node.js is the open source, cross-platform javascript run time environment.
Now to create an Angular 15 application run the below command
NgnewAngular15App
Once you run the above command it will ask to install routing like below, give Y and press enter
After that, it will ask to add CSS like the below,
Once you press enter, it will take a few minutes to create the Angular 15 Application.
So from above, we can see, the angular 15 project creation is in progress.
From the above image, we can see, the angular 15 projects was created successfully.
After creating this project, now let's open the VS code, go File tab then select the folder, and go to the directory where we created the angular 15 project, from there, select the angular15 project folder. Once you will load the project, you will see all files in VS code.
Now run the ng serve –o command, it will open the angular15 project like below
If you face an error like below then delete ng.ps1 file
PS C:\Users\DELL\Angular15App> ng serve -o
ng : File C:\Users\DELL\AppData\Roaming\npm\ng.ps1 cannot be loaded. The file C:\Users\DELL\AppData\Roaming\npm\ng.ps1 is not digitally signed.
You cannot run this script on the current system. For more information about running scripts and setting execution policies, see
Join the conversation! Your thoughts help the community grow.