@ angular / router ver 3.1.0中的PreloadingStrategy在哪里

时间:2016-10-18 22:06:33

标签: angular

我刚刚用npm安装了angular2路由器的3.1.0版本;但我没有看到PreloadingStrategy@angular/router/src/router_preloader.ts文件。根据这篇博文:http://angularjs.blogspot.ro/2016/10/angular-210-now-available.html它应该可用。我错过了什么或者npm包有问题吗?

我在package.json中的完整依赖项列表如下:

  "dependencies": {
    "@angular/common": "2.1.0",
    "@angular/compiler": "2.1.0",
    "@angular/core": "2.1.0",
    "@angular/forms": "2.1.0",
    "@angular/http": "2.1.0",
    "@angular/platform-browser": "2.1.0",
    "@angular/platform-browser-dynamic": "2.1.0",
    "@angular/router": "3.1.0",
    "core-js": "^2.4.1",
    "rxjs": "5.0.0-beta.12",
    "ts-helpers": "^1.1.1",
    "zone.js": "^0.6.23"
  }

1 个答案:

答案 0 :(得分:1)

位于“@ angular / router”:“3.1.2”,

export declare abstract class PreloadingStrategy {
    abstract preload(route: Route, fn: () => Observable<any>): Observable<any>; }

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