Getting Started with Angular App – Install your first Angular App

Angular is one of the biggest Javascript frameworks for building new web applications. In 2010 Google created & developed Angular with large community support. Here you can read more details about it.
How to Install your first Angular App from scratch. In this article, we going to see how to install and start the Angular app. Using Angular CLI (Command Line Interface) you can install your first Angular app in the fastest and simplest way. Let’s start by installing the best JavaScript framework by creating your first Angular app.
If you already know with Angular 2, 4, 5, 6 and 7 the process of starting a new Angular 8 project is pretty much similar. So, if you have no earlier experience with Angular, don’t worry. The process for all the application same, you can install the Angular app with the following steps.
Also Read: Why do you need Angular for your front-end Development
Prerequisites
Before starting you need to do a couple of things before proceeding.
1. Node.js (Recommended version)
2. Node Package Manager (NPM)
To check whether you have installed both of these in your system or not. Use the following command line to check the version, also check whether you installed above these things or not.
1 2 |
$ node -v $ npm -v |
Install Angular through CLI
Once you completed the installation of (Node Package Manager) NPM, you can install Angular CLI in the following steps. Open your terminal or command prompt in your system and enter the below command.
Note: If you have trouble with installation on mac, using the sudo command to execute.
1 |
npm install -g @angular/cli |
The above command installs the Angular globally in your system, g stands for global installation.
Check Angular CLI version
Once the installation completed, use the following command to check whether the Angular application installation is completed successfully or not. Also, check the current Angular version CLI.
1 |
ng v |
Create a New Angular App with the CLI
Now it is time to start a new project with Angular CLI. For this first, you need to choose where your files need to save source code and execute your project. After you chose the location then use the following command to install your first Angular app.
1 |
ng new my-app |
The above command will help to install your Angular app project with all the configurations that you required.
Run your first Angular App
Once you create the first Angular project, now open the browser and type http://localhost:4200 in the address bar and run your Welcome page. Also, you can open your project using the following command.
1 |
ng serve --open |
Conclusion
Getting started with an Angular project with the help of the CLI makes it very fast and secure, also pretty flexible with the type of standards you can use.
Mraj
Creative Designer & Developer specialist by the spirit and a loving blogger by thoughts. If you have any questions let me drop an email with the article name to the following email id: [email protected]