填寫這份《一分鐘調查》,幫我們(開發組)做得更好!去填寫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>