Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Preload key requests for angular performance optimization with Light house report plugin #8974


User avatar
0
MellowoodMedical created

Hi,

Recently we tried to optimize the angular project by using a chrome plugin called Light house report. One of the suggestion they provided is to preload key requests, which leads us to the following website route preloading in angular.

What the website suggests is that we can use preloading strategy that is provided by the base angular, and also quick link loading stratergy provided by a third party library as well.

import { RouterModule, PreloadAllModules } from '@angular/router';
// …

RouterModule.forRoot([
  …
], {
  preloadingStrategy: PreloadAllModules
})
// …

However, when we try to implement this to our root-routing.module.ts file, the project can not start properly and the browser stuck. Any suggestion on this? Thanks


3 Answer(s)