diff options
author | zhangab <zhanganbing@chinamobile.com> | 2018-10-23 11:32:03 +0800 |
---|---|---|
committer | zhangab <zhanganbing@chinamobile.com> | 2018-10-23 11:32:05 +0800 |
commit | de9d2e95b43991fccee342ebed03b006f6fed844 (patch) | |
tree | 0667c51a30fd3fed71fec797136d8adefc7d7baf /usecaseui-portal/src/app/app.module.ts | |
parent | 101e5e37f4ece60af8d08020c7e4bd8f473adce7 (diff) |
Build AngularJs component for usecase-ui
Change-Id: I393f4837fc5f9cbd71448dbf20e1f1781f0656d3
Issue-ID: USECASEUI-154
Signed-off-by: zhangab <zhanganbing@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app/app.module.ts')
-rw-r--r-- | usecaseui-portal/src/app/app.module.ts | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/usecaseui-portal/src/app/app.module.ts b/usecaseui-portal/src/app/app.module.ts new file mode 100644 index 00000000..7c24f110 --- /dev/null +++ b/usecaseui-portal/src/app/app.module.ts @@ -0,0 +1,98 @@ +import { BrowserModule } from '@angular/platform-browser'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { NgModule } from '@angular/core'; +import { FormsModule } from '@angular/forms'; +import { HttpClientModule } from '@angular/common/http'; +import { HttpClient } from '@angular/common/http'; +import { NgZorroAntdModule } from 'ng-zorro-antd'; +import { NZ_I18N, en_US } from 'ng-zorro-antd'; +import { NgxEchartsModule } from 'ngx-echarts'; + +import { TranslateModule, TranslateLoader } from '@ngx-translate/core'; +import {TranslateHttpLoader} from '@ngx-translate/http-loader'; +export function HttpLoaderFactory(httpClient: HttpClient) { + return new TranslateHttpLoader(httpClient, '../assets/i18n/', '.json'); +} + +import { AppRoutingModule } from './app-routing.module'; + +//注册语言包 +import { registerLocaleData } from '@angular/common'; +import en from '@angular/common/locales/en'; +registerLocaleData(en); + +//自定义组件 +import { AppComponent } from './app.component'; +import { HomeComponent } from './home/home.component'; +import { ServicesComponent } from './services/services.component'; +import { ServicesListComponent } from './services/services-list/services-list.component'; +import { OnboardVnfVmComponent } from './services/onboard-vnf-vm/onboard-vnf-vm.component'; +import { AlarmComponent } from './alarm/alarm.component'; +import { PerformanceComponent } from './performance/performance.component'; +import { PerformanceVnfComponent } from './performance/performance-vnf/performance-vnf.component'; +import { PerformanceVmComponent } from './performance/performance-vm/performance-vm.component'; +import { CcvpnNetworkComponent } from './ccvpn-network/ccvpn-network.component'; +import { CcvpnDetailComponent } from './ccvpn-detail/ccvpn-detail.component'; +import { CcvpnCreationComponent } from './ccvpn-creation/ccvpn-creation.component'; + +import { DetailsComponent } from './components/details/details.component'; +import { GraphiclistComponent } from './components/graphiclist/graphiclist.component'; + +import { BarComponent } from './components/charts/bar/bar.component'; +import { LineComponent } from './components/charts/line/line.component'; +import { PieComponent } from './components/charts/pie/pie.component'; + +import {PathLocationStrategy, LocationStrategy, HashLocationStrategy} from '@angular/common'; +// 自定义服务 +import { MyhttpService } from './myhttp.service'; +import { networkHttpservice } from './networkHttpservice.service'; + +@NgModule({ + providers : [ + { provide: LocationStrategy, useClass: HashLocationStrategy }, + { provide: NZ_I18N, useValue: en_US }, + MyhttpService, + networkHttpservice + ], + declarations: [ + AppComponent, + HomeComponent, + + ServicesComponent, + ServicesListComponent, + OnboardVnfVmComponent, + + AlarmComponent, + + PerformanceComponent, + PerformanceVnfComponent, + PerformanceVmComponent, + DetailsComponent, + PieComponent, + LineComponent, + BarComponent, + GraphiclistComponent, + + CcvpnNetworkComponent, + CcvpnDetailComponent, + CcvpnCreationComponent, + ], + imports: [ + BrowserModule, + FormsModule, + HttpClientModule, + TranslateModule.forRoot({ + loader: { + provide: TranslateLoader, + useFactory: HttpLoaderFactory, + deps: [HttpClient] + } + }), + BrowserAnimationsModule, + NgZorroAntdModule.forRoot(), + NgxEchartsModule, + AppRoutingModule + ], + bootstrap: [ AppComponent ] +}) +export class AppModule { }
\ No newline at end of file |