angularcli 搭建项目

1.全局安装:npm install @angular/cli  -g

2.检测安装 :ng --version

3.创建项目:ng new 自己的项目名

4.启动项目:ng  start   /  ng server

5. CLI 为你创建了第一个 Angular 组件。 它就是名叫 app-root 的根组件。你可以在 ./src/app/app.component.ts 目录下找到它。

  export class AppComponent {

            title = 'My First Angular App!';

}

备注: app/app.component  根组件

            main.ts  应用的主要入口

            style.css 全局样式

原文地址:https://www.cnblogs.com/rxfn/p/9554361.html