Install Angular2 under Linux (Ubuntu)

Source: Internet
Author: User
Tags install node

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.