34 lines
1.1 KiB
TypeScript
34 lines
1.1 KiB
TypeScript
import { BrowserModule } from '@angular/platform-browser';
|
|
import { BrowserAnimationsModule } from "@angular/platform-browser/animations"
|
|
import { NgModule } from '@angular/core';
|
|
import { PLATFORM_ID, APP_ID, Inject } from '@angular/core';
|
|
import { isPlatformBrowser } from '@angular/common';
|
|
|
|
import { AppRoutingModule } from './app-routing.module';
|
|
import { AppComponent } from './app.component';
|
|
import { GalleryModule } from "./gallery/gallery.module";
|
|
|
|
@NgModule({
|
|
declarations: [
|
|
AppComponent
|
|
],
|
|
imports: [
|
|
BrowserModule.withServerTransition({
|
|
appId: 'angullary'
|
|
}),
|
|
BrowserAnimationsModule,
|
|
AppRoutingModule,
|
|
GalleryModule,
|
|
],
|
|
providers: [],
|
|
bootstrap: [AppComponent]
|
|
})
|
|
export class AppModule {
|
|
constructor(@Inject(PLATFORM_ID) private platformId: Object,
|
|
@Inject(APP_ID) private appId: string) {
|
|
const platform = isPlatformBrowser(platformId) ?
|
|
'in the browser' : 'on the server';
|
|
console.log(`Running ${platform} with appId=${appId}`);
|
|
}
|
|
}
|