在我的角度入门应用程序中,我将每个独立的功能分成它自己的模块并导入AppModule
中的所有功能模块:
import { NgModule } from '@angular/core';
import { Router } from '@angular/router';
import { AppRoutingModule } from './app-routing.module';
import { CoreModule } from './core/core.module';
import { AppComponent } from './app.component';
import { BusinessAccountManagementModule } from './business-account-management/business-account-management.module';
import { InvestigationModule } from './investigation/investigation.module';
@NgModule({
imports: [
CoreModule, // this will provide CommonModule, RouterModule and BrowserModule for us to use
/* Feature Modules */
BusinessAccountManagementModule,
InvestigationModule,
AppRoutingModule
],
declarations: [
AppComponent
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule {
constructor(private router: Router) {
}
}
我需要的是在我构建时自定义要导入的功能模块..
例如,如果我想构建包含BusinessAccountManagementModule
的版本,那么我想做类似的事情:
ng build --featureModule BusinessAccountManagementModule
更多:
ng build --featureModule BusinessAccountManagementModule InvestigationModule ...
有没有机会这样做?