填写这份《一分钟调查》,帮我们(开发组)做得更好!去填写Home

PreloadAllModules

提供一种预加载策略,以尽快预加载所有模块。

Provides a preloading strategy that preloads all modules as quickly as possible.

查看"说明"...

      
      class PreloadAllModules implements PreloadingStrategy {
  preload(route: Route, fn: () => Observable<any>): Observable<any>
}
    

说明

      
      RouterModule.forRoot(ROUTES, {preloadingStrategy: PreloadAllModules})
    

方法

      
      preload(route: Route, fn: () => Observable<any>): Observable<any>
    
参数
route Route
fn () => Observable
返回值

Observable<any>