Home > Web Front-end > JS Tutorial > body text

A simple way to build an angular2.0 project

一个新手
Release: 2017-09-13 10:34:02
Original
1474 people have browsed it

Requirements: Install node6.9, npm3.0 or above
The next two steps are to complete the construction of the project

1. Install the global angular cli scaffolding

Command

npm install -g @angular/cli
Copy after login

2. In the directory where you want to build the project, shift + right-click the mouse, (select the current window to open the command line), and execute the command under cmd

ng new my-app
Copy after login

Project environment The build is successful. Open the cmd window in the my-app directory and execute npm install to install the dependencies

 npm install
Copy after login

. After successfully installing the dependencies, execute the command

ng serve --open
Copy after login

and the project can be run in the browser!

The above is the detailed content of A simple way to build an angular2.0 project. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template