@NgModule({
declarations: [], //属于当前模块的组件、指令及管道
imports: [], //当前模板所依赖的项,即外部模块(包括httpModule、路由等)
export:[],//声明出应用给其他的module使用
providers: [], //注入服务到当前模块
bootstrap: []//默认启动哪个组件(只有根模块才能设置bootstrap属性)
})
Angular | Ngmodule (二)
发布时间 2023-12-26 15:23:30作者: 两块五的菜鸟