**
angular的根模块文件app.module.ts
**
//引入依赖
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
//@NgModule装饰器用于创建功能模块
@NgModule({
//声明组件
declarations: [
AppComponent
],
//依赖模块
imports: [
//BrowserModule模块提供了在Web浏览器中运行angular应用程序所需的功能
BrowserModule
],
//共享服务
providers: [],
//启动组件
bootstrap: [AppComponent]
})
//根模块,没有其他模块调用它,因此没有属性和方法
export class AppModule { }