In the post Angular 6 Project Example. We will install Angular 6 using Angular CLI and both the CLI and generated project have dependencies that require Node 8.9 or higher, together with NPM 5.5.1 or higher.
The following tools and libraries are required for this tutorial:
- Node.js 8.9 or higher
- Angular CLI
- MongoDB
- Express
- Terminal or Bash or CMD
- Editor or IDE(Mine is Visual Studio Code)
To update NPM, you can run the following command in the terminal
1 |
npm install -g npm@latest |
And uninstall the old Angular CLI and install the latest version
1 2 3 |
npm uninstall -g @angular/cli npm cache clean npm install -g @angular/cli |
Angular 6 Project Example
Create Angular 6 Project
1 |
ng new Angular6App |
Open Angular 6 Project on Visual Studio Code
Go into the project folder
1 |
cd Angular6App |
Now, start the Angular 6 application using the following command
1 |
ng serve --open |
It compiles and opens up the browser at this URL: http://localhost:4200. The browser should display like this
References
Angular Quickstart