Fixes lint error. Adds transition module

parent 44b17149
Pipeline #23423 passed with stages
in 11 minutes and 53 seconds
import { HttpClient } from '@angular/common/http';
import { NgModule, PLATFORM_ID } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserModule, BrowserTransferStateModule } from '@angular/platform-browser';
import { RouterModule, Routes } from '@angular/router';
import { ServiceWorkerModule } from '@angular/service-worker';
import { JWT_OPTIONS, JwtModule } from '@auth0/angular-jwt';
......@@ -101,6 +100,7 @@ export const appRoutes: Routes = [
],
imports: [
BrowserModule.withServerTransition({ appId: 'frontend' }),
BrowserTransferStateModule,
ServiceWorkerModule.register('/ngsw-worker.js', { enabled: environment.production }),
ModalsModule,
TranslateModule.forRoot({
......
import { NgModule } from '@angular/core';
import { ServerModule } from '@angular/platform-server';
import { ServerModule, ServerTransferStateModule } from '@angular/platform-server';
import { NgtPwaMockModule } from '@ng-toolkit/pwa';
import { ModuleMapLoaderModule } from '@nguniversal/module-map-ngfactory-loader';
......@@ -8,7 +8,7 @@ import { RootComponent } from './root/root/root.component';
@NgModule({
imports: [
NgtPwaMockModule, RootModule, ServerModule, ModuleMapLoaderModule,
NgtPwaMockModule, RootModule, ServerModule, ModuleMapLoaderModule, ServerTransferStateModule,
],
providers: [
// Add universal-only providers here
......
......@@ -117,7 +117,7 @@ export class RootComponent implements OnInit, AfterViewInit {
console.log('sw isenabled', this.swUpdate.isEnabled);
if (this.swUpdate.isEnabled) {
this.swUpdate.available.subscribe((evt) => {
this.swUpdate.available.subscribe((event) => {
console.log('service worker updated');
console.log('current version is', event.current);
console.log('available version is', event.available);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment