- angular中所有的组件时放在单独的模块当中的,这点与vue不同,vue中所有的模块都是放在一起的
- angular中的模块用于对组件进行分组,angular项目默认初始有一个appModule

Angular启动过程分析:
- angular.json:angular框架的配置文件
"index": "src/index.html":"main": "src/main.ts":入口文件
main.ts:中包含bootstrapModule指定引导启动模块============main.ts==========.......//bootstrapModule引导启动模块platformBrowserDynamic().bootstrapModule(AppModule).catch(err => console.error(err));
app.module.ts:此模块包含启动引导组件bootstrap:[AppComponent]=============app.module.ts============@NgModule({declarations: [AppComponent],imports: [BrowserModule],providers: [],//启动引导组件bootstrap: [AppComponent]})export class AppModule { }
app.component.ts:启动引导组件@Component({//选择器selector: 'app-root',//模板templateUrl: './app.component.html',//样式表styleUrls: ['./app.component.css']})//scriptexport class AppComponent {title = 'myngapp01';}
- angular.json:angular框架的配置文件
