If you have seen Angular2 's official website, you should know that you can quickly build a angular project with CLI tools, install node. js and NPM before installing the CLI, and node. JS has a version of 6.9.0 or more, NPM should be above 3.0.0.
My node. js and NPM were installed successfully, but always made an error while installing ANGULAR/CLI, and later knew that node. JS had to install the 6.9.4 version.
Before installing node. js, if you do not have g++ and Libssl-dev installed, follow these steps to install:
sudo apt-get install g++
sudo apt-get install Libssl-dev
The next step is to install node. JS:
wget http://nodejs.org/dist/v6.9.4/node-v6.9.4.tar.gz
Tar zxvf node-v6.9.4.tar.gz
./configure
Make && make install
This installs and the version number can be viewed at the terminal:
Node-v
node. js and NPM are all installed and can be installed ANGULAR2, according to the following website:
NPM install-g @angular/CLI
After installation, create a new ANGULAR2 project.
ng New MYAPP
Where MyApp is the name of your project. After the terminal enters the MyApp directory and runs the project through NG server, the default port number is 4200, and the comrades who want to change the port number can use NG server--port 4211--host localhost.
Install Angular2 under Linux (Ubuntu)