1 npm install -g @angular/cli 2 ng --version 3 ng new appDemo 4 cd appDemo 5 ng serve --o(启动服务) 项目结构如下: