If You’re going to Install Angular 5 on your PC make sure that these things are already installed on your system :
— Node Package Manager (NPM)
Checkout How to Install Angular 4 On Ubuntu and Upgrade guides
To check whether you have both of these installed or not, run your command line or console and type:
$ node -v
$ npm -v
If these command will not work and does not recognized then please install the nodejs and package manager from the nodejs.org official website.
#1: Installing Angular 5 through the CLI
Angular CLI (Command Line Interface) is easiest way to install angular 5 on your system.
$ npm install @angular/cli -g
If you want to check the version of angular cli then you can run the command.
$ ng -v
To install Angular 5 through the CLI just write
$ ng new my-new-project --style=scss --routing
Here we want to use the CSS to use the Sass compiler
–routing tells the CLI to provide us with the routing scaffolding
you can change directory into your new project folder. To do that, simply type:
$ cd my-new-project
serve your project in the browser
$ ng serve
Now, You have a fresh copy of Angular 5 and almost ready and waiting for you to development.
Now, if you wanted to set up your new Angular 5 project to work with the Sass styling,
So, you can run the following command for all setup.
$ ng new projectName --style=scss (or --style=sass)
if you wanted to combine project with Sass support and routing. then you can do like in this way.
$ ng new projectName --style=scss --routing
#2:- Installing Angular 5 without the CLI
Download Angular Quickstart and Once downloaded,
extract all of the folders and file to a your new project folder.
Once all finished just run the command.
$ npm install