我正在尝试在我的角度项目中使用ng-http-loader。我已经安装了ng-http-loader软件包。在编译项目时出现错误。错误是
在'rxjs'中找不到导出'分区'。
package.json :
"dependencies": {
"@angular/animations": "^8.2.2",
"@angular/cdk": "^8.1.3",
"@angular/common": "~8.0.0",
"@angular/compiler": "~8.0.0",
"@angular/core": "~8.0.0",
"@angular/forms": "~8.0.0",
"@angular/material": "^8.1.3",
"@angular/platform-browser": "~8.0.0",
"@angular/platform-browser-dynamic": "~8.0.0",
"@angular/router": "~8.0.0",
"hammerjs": "^2.0.8",
"ng-http-loader": "^6.0.1",
"rxjs": "^6.5.2",
"tslib": "^1.9.0",
"zone.js": "~0.9.1"
},
答案 0 :(得分:0)
ng-http-loader.js不能导入
答案 1 :(得分:-2)
转到ng-http-loader.js。您会看到以下内容
import { ReplaySubject,partition, merge, timer } from 'rxjs';
import { finalize, switchMap, debounce, distinctUntilChanged, tap} from
'rxjs/operators';
您只需将它们更改为此:
import { ReplaySubject, merge, timer } from 'rxjs';
import { finalize, switchMap, debounce, distinctUntilChanged, tap, partition }
from 'rxjs/operators';