import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {HTTP_INTERCEPTORS, HttpClientModule} from '@angular/common/http';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { NZ_I18N } from 'ng-zorro-antd/i18n';
import { zh_CN } from 'ng-zorro-antd/i18n';
import { registerLocaleData } from '@angular/common';
import zh from '@angular/common/locales/zh';
import {NgZorroAntdModule} from 'ng-zorro-antd';
import {InitGuardService} from './services/init-guard.service';
import {InterceptorService} from './services/Interceptor.service';
import {NavigationModule} from './admin/navigation/navigation.module';
import {AppCommonModule} from './app-common.module';
import {NgxEchartsModule} from 'ngx-echarts';
import {HashLocationStrategy, LocationStrategy} from '@angular/common';
registerLocaleData(zh);



@NgModule({
  declarations: [
    AppComponent,
  ],
  imports: [
    BrowserModule,
    AppRoutingModule,
    NgZorroAntdModule,
    FormsModule,
    HttpClientModule,
    BrowserAnimationsModule,
    ReactiveFormsModule,
    NavigationModule,
    AppCommonModule,
    NgxEchartsModule,
  ],
  providers: [
    {provide: LocationStrategy, useClass: HashLocationStrategy},
    { provide: NZ_I18N, useValue: zh_CN },
    {provide: HTTP_INTERCEPTORS, useClass: InterceptorService, multi: true},
    InitGuardService, // 校验登录
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }
