Setting up the Environment
To set up the angular environment to develop an Angular application, we have to install 2 utilities.
First, we need to install Node.js
By installing the Node, npm(Node Package Manager) will be available for use.
Npm is the command-line utility that can interact with the repositories of open-source projects.
Npm can be used to install the libraries, packages, applications along with the dependencies.
The transpilation process is also the responsibility of npm.
Next, we need to install the Angular CLI.
This is also a command-line utility, which is responsible for the creation of boilerplate files for setting up the angular application. Angular CLI can be used to create the project, generate application codes, perform the various development tasks such as testing, build, deployment, etc.
We can install the Angular CLI using the npm command.
For this:
- Open terminal or console window
- Execute the below npm command
npm install -g @angular/cli
We can check the angular version by executing the below command:
ng - -version
We will get the result as below:
Once the npm and Angular CLI have installed successfully, we can create the Angular project by executing the below command:
ng new our-project-name
This will take a couple of minutes to create the project.
Once the project is created, we can execute the project and see the result by executing the below command.
Note
Please change the current directory to the project folder using the cd command
ng serve --open
Need more read? , click >>
Here
Conclusion
In this article, I have tried to give an introductory idea about an Angular application. Next, we should understand how does the angular application executes and launch the components, which I have explained in my next article.
Happy Learning