1

在 Angular2 中。当我在主题上调用 onNext 时,它显示未解决。rx 已正确导入。

import { Subject } from 'rxjs/Subject';
...
private _subject = new Subject();

...
this._progress$ = Observable.create(observer => {
      this._progressObserver = observer
    }).share();
    this._subject = Subject.create(this._progressObserver, this._progress$);

...
this._subject.onNext(10/100);
4

1 回答 1

2

.next()。不是onNext()

this._subject.next(10/100);
于 2016-05-06T09:28:12.333 回答