私は角を見ることができます。実際に私の問題をクリックしたときに私のsubscribe
機能が呼び出されなかったのですか?私たちはここに2号機でsubscribe関数が呼び出されないのはなぜですか?
https://plnkr.co/edit/83NaHoVaxiXAeUFoaEmb?p=preview
constructor() {
this.data = new Observable(observer => this.dataObserver = observer);
this.data.subscribe(value => {
console.log('+++')
console.log(value)
})
}
hndle(){
this.name.push({name:"navee"});
this.dataObserver.next(this.name);
}
next
関数を呼び出すときのドキュメントsubscribe
あたりの関数として が呼び出されます、私はあなたのコードを変更したボロディミールBilyachatの提案に基づいて文書
http://reactivex.io/rxjs/manual/tutorial.html
hndleはいつ呼びますか? –