import { PreloadingStrategy, Route } from '@angular/router';
      import { Observable, of } from 'rxjs';
      export class PreloadSelectedModulesList implements PreloadingStrategy {
        preload(route: Route, load: Function): Observable<any> {
          return &&['preload'] ? load() : of(null);
      Typescript language logo
      your recipe card header background

      Angular Preload OptIn

      Angular TypeScript Recipes

      The PreloadSelectedModulesList class implements the PreloadingStrategy interface. When the preload() method is called, the load() method will be executed if the route's data property has a preload value. Otherwise, the of() method will return null.

      Library: angular

      Shortcut: angular.preload.optin


        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.