56 lines
1.6 KiB
TypeScript
56 lines
1.6 KiB
TypeScript
import { BrowserModule } from '@angular/platform-browser';
|
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
import { RouteReuseStrategy } from '@angular/router';
|
|
import { NgModule } from '@angular/core';
|
|
import { CommonModule } from '@angular/common'
|
|
import { HttpClientModule } from '@angular/common/http'
|
|
import { NgZorroAntdModule } from 'ng-zorro-antd';
|
|
|
|
import { AppRoutingModule } from './app-routing.module'
|
|
|
|
import { AppComponent } from './app.component';
|
|
|
|
/** http */
|
|
import { HttpService } from './services/http.service'
|
|
import { HttpClientService } from './services/http-client.service'
|
|
|
|
/* 消息提示 */
|
|
import { ToastModule } from './components/toast/toast.module'
|
|
|
|
/* 预加载策略 */
|
|
import { SelectivePreloadingStrategy } from './preloading-strategy';
|
|
|
|
/* 路由权限控制 */
|
|
import { LoginAuthService } from './services/login-auth.service';
|
|
|
|
/* websocket */
|
|
import { WebsocketService } from './services/websocket.service';
|
|
|
|
/* 路由缓存策略 */
|
|
import { AppReuseStrategy } from './router-reuse-strategy';
|
|
|
|
@NgModule({
|
|
declarations: [
|
|
AppComponent
|
|
],
|
|
imports: [
|
|
BrowserModule,
|
|
BrowserAnimationsModule,
|
|
CommonModule,
|
|
HttpClientModule,
|
|
ToastModule,
|
|
NgZorroAntdModule,
|
|
AppRoutingModule
|
|
],
|
|
providers: [
|
|
SelectivePreloadingStrategy,
|
|
LoginAuthService,
|
|
HttpService,
|
|
HttpClientService,
|
|
WebsocketService,
|
|
{ provide: RouteReuseStrategy, useClass: AppReuseStrategy }
|
|
],
|
|
bootstrap: [AppComponent]
|
|
})
|
|
export class AppModule { }
|