Angular with angular / cli - 无法找到rxjs运算符mergeDelayError

时间:2017-03-12 11:07:42

标签: angular rxjs observable angular2-observables

我目前正在使用 Angular(2.4.0) angular / cli(1.0.0-rc1),在许多地方使用 RxJs 库。整个安装非常标准(即我没有个性化任何配置文件)。

这是我的package.json

{
  "name": "sharewithfriends",
  "version": "0.0.0",
  "license": "MIT",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/common": "^2.4.0",
    "@angular/compiler": "^2.4.0",
    "@angular/core": "^2.4.0",
    "@angular/forms": "^2.4.0",
    "@angular/http": "^2.4.0",
    "@angular/platform-browser": "^2.4.0",
    "@angular/platform-browser-dynamic": "^2.4.0",
    "@angular/router": "^3.4.0",
    "angularfire2": "^2.0.0-beta.8",
    "core-js": "^2.4.1",
    "firebase": "^3.7.0",
    "rxjs": "^5.1.0",
    "zone.js": "^0.7.6"
  },
  "devDependencies": {
    "@angular/cli": "^1.0.0-rc.1",
    "@angular/compiler-cli": "^2.4.0",
    "@types/jasmine": "2.5.38",
    "@types/node": "~6.0.60",
    "codelyzer": "~2.0.0",
    "jasmine-core": "~2.5.2",
    "jasmine-spec-reporter": "~3.2.0",
    "karma": "~1.4.1",
    "karma-chrome-launcher": "~2.0.0",
    "karma-cli": "~1.0.1",
    "karma-coverage-istanbul-reporter": "^0.2.0",
    "karma-jasmine": "~1.1.0",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~5.1.0",
    "ts-node": "~2.0.0",
    "tslint": "~4.4.2",
    "typescript": "~2.0.0"
  }
}

现在我有一个观点,我想使用mergeDelayError的{​​{1}}运算符。不幸的是,VSCode的intellisense无法找到这样的运算符。

关于我做错了什么的任何建议?

2 个答案:

答案 0 :(得分:2)

RxJS 5 中没有这样的运算符mergeDelayError(这是Angular 2 +中使用的RxJS版本)

它是在RxJS4中实现的,目前在migrations-page上没有提及 - 如果你想在RxJS5中使用它,你应该在github-page上打开一个功能请求,或者自己移植并创建它一个拉动请求。

答案 1 :(得分:0)

此链接here中找到的RxJ的源代码。不包含mergeDelayError运算符

所以你不会得到intellisense