To install Angular 7 on your machine you have to require the following things to be installed in your machine.
- Install Visual Studio Code IDE or JetBrains WebStorm.
- Install Node.js
- Using npm to install angular cli
Follow the steps to set up an Angular 7 Environment:
- Step 1: Install Visual Studio Code IDE (or JetBrains WebStorm)
Visual Studio Code is light and easy to set up, it has a great range of built-in IntelliSense features. It is free to use. It also provides a huge number of extensions that will significantly increase performance.
Click the link to download
- Step 2: Install Node.js
The Node.js manages npm dependencies support some browsers when loading particular pages. It provides necessary libraries to run the Angular project. It also serves the run-time environment on localhost (local machine).
To download the Node.js Clcik here, follow the below screenshots.
- Step 3: Using npm to install angular cli
Open your VS Code IDE and choose a folder for the path of the project and open it on VS Code by selecting File->Open Folder.
Run the following command to install angular CLI:
npm install -g @angular/cli
It will load the angular cli from where we will use ng command to do further actions.
To Create Angular app follow the steps after the Angular cli installation:
- Step 1: Making and Running FirstApp
Now with the help of CLI we are ready to start with building up of new default project. To do so write the following command on the terminal.
ng new FirstApp
This will create all the setup and files along with a default angular page. Note the diagram, for each project it asks weather to enable routing or not and the styling that we want to choose (CSS, SCSS, Stylus). Choose yes for routing if the application contains multiple linked components. When everything is complete we will see that a directory with name FirstApp will appear at the left directory column.
- Step 2: Now to run it on the local server. To do so first navigate to the project folder using cd command and the write the following command on the terminal.
- -o option is used for automatic opening of the browser:
ng serve -o
This is how the default page will look like :
To close the server: Open the IDE and press Ctrl + C and press Y when it will prompt for termination of the server.
- Angular CLI | Angular Project Setup
- Routing in Angular JS using Angular UI Router
- Introduction and Installation of Git
- Vue.js | Introduction & Installation
- Materialize | Introduction and Installation
- Laravel | Installation and Configuration
- Installation of Node.js on Linux
- Installation of Node.js on Windows
- p5.js | SoundFile Object Installation and Methods
- Introduction and Installation of Heroku CLI on Windows machine
- Angular 7 | Architecture
- Angular 7 | Introduction
- How to use jQuery in Angular ?
- Angular 7 | Observables
- Angular 4 | Introduction
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.