You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
pocketcommunityweb/src/app/app.module.ts

54 lines
1.4 KiB

import {BrowserModule} from '@angular/platform-browser';
import {NgModule} from '@angular/core';
import {AppRoutingModule} from './app-routing.module';
// 主框架
import {AppComponent} from './app.component';
// 响应式表单
import {ReactiveFormsModule} from '@angular/forms';
// 国际化支持
import {TranslateLoader, TranslateModule} from '@ngx-translate/core';
import {TranslateHttpLoader} from '@ngx-translate/http-loader';
// cookie
import {CookieService} from 'ngx-cookie-service';
// 异常处理组件
import {ErrorComponent} from './error/error.component';
// 账号管理模块
import {AccountModule} from './account/account/account.module';
// 论坛模块
import {ForumModule} from './forum/forum/forum.module';
// Http请求模块
import {HttpClient, HttpClientModule} from '@angular/common/http';
export function HttpLoaderFactory(http: HttpClient) {
return new TranslateHttpLoader(http);
}
/**
* 应用入口
*/
@NgModule({
declarations: [
AppComponent,
ErrorComponent
],
imports: [
BrowserModule,
AppRoutingModule,
ReactiveFormsModule,
AccountModule,
ForumModule,
HttpClientModule,
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
useFactory: HttpLoaderFactory,
deps: [HttpClient]
}
})
],
providers: [CookieService],
bootstrap: [AppComponent]
})
export class AppModule {
}