dependencies Legend  Declarations  Module  Bootstrap  Providers  Exports cluster_AppBrowserModule cluster_AppBrowserModule_imports cluster_AppBrowserModule_bootstrap AppModule AppModule AppBrowserModule AppBrowserModule AppModule->AppBrowserModule AppComponent AppComponent AppBrowserModule->AppComponent

File

apps/demo/src/app/app.browser.module.ts

Imports

Bootstrap

import { APP_INITIALIZER, NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
import { REQUEST } from '@nguniversal/express-engine/tokens';
import { BrowserStorage, LangService, STORAGE_CONFIG_TOKEN, TokenService } from '@rucken/core';
import { ThemesService } from '@rucken/web';
import { AppComponent } from './app.component';
import { AppModule } from './app.module';
import { config } from './config/config';
import { initializeBrowserApp } from './utils/initialize-browser-app';
@NgModule({
  bootstrap: [AppComponent],
  imports: [BrowserModule.withServerTransition({ appId: config.app.id }), FontAwesomeModule, AppModule],
  providers: [
    {
      provide: REQUEST,
      useFactory: () => {
        return { headers: { cookie: document.cookie } };
      }
    },
    { provide: STORAGE_CONFIG_TOKEN, useClass: BrowserStorage },
    { provide: 'ORIGIN_URL', useValue: location.origin },
    {
      provide: APP_INITIALIZER,
      useFactory: initializeBrowserApp,
      multi: true,
      deps: [TokenService, ThemesService, LangService]
    }
  ]
})
export class AppBrowserModule {}

result-matching ""

    No results matching ""