1

请,我需要帮助我的代码不起作用:

this.howToUseObservables().subscribe(ress => alert('in app ' + ress));

为什么testSubject.next('test');根本不开火?谢谢

howToUseObservables(): Subject<any> {
const testSubject: Subject<any> = new Subject();
testSubject.next('test');
return testSubject;
}

this.howToUseObservables().subscribe(ress => alert('in app ' +ress));
4

0 回答 0