在 angular(2/4/6) 应用程序中,如果我们在 app 模块中导入不必要的模块会减慢应用程序的速度。
它会影响应用程序的性能吗?
@NgModule({
imports: [
BrowserModule.withServerTransition({ appId: 'myId' }),
FormsModule,
AppRoutingModule,
HttpClientModule,
HttpClientInMemoryWebApiModule,
AaModule,
BbModule
],
declarations: [
AppComponent,
AdminComponent
],
providers: [ ],
bootstrap: [ AppComponent ]
})
Run Code Online (Sandbox Code Playgroud)