【发布时间】:2018-10-20 19:20:10
【问题描述】:
我最近从 Angular 5 更新到 Angular 6。
我收到此警告 combineLatest is deprecated: resultSelector no longer supported, pipe to map instead。 Rxjs 是 6.1.0 版本,tslint 是 5.10.0,Angular CLI 是 6.0.0 和 Typescript 2.7.2。我是这样使用它的:
const a$ = combineLatest(
this.aStore.select(b.getAuth),
this.cStore.select(b.getUrl),
(auth, url) => ({auth, url}),
);
我也试过这样:
empty().pipe(
combineLatest(...),
...
)
但这给了我:combineLatest is deprecated: Deprecated in favor of static combineLatest 和 empty 也被弃用,有利于它的静态版本。
【问题讨论】:
-
你也可以试试 a$.pipe(a$ => combineLatest(a$,b$, c$)); with import { combineLatest } from 'rxjs';
标签: angular rxjs angular6 tslint