【发布时间】:2020-09-14 00:31:19
【问题描述】:
我正在学习 rxjs。我有一个数组中的 observable。我想在函数中添加一些水果,使用 subscribe 和 next。我写了但不对,我可以帮助你。非常感谢!
const fruits = from([
"apple",
"banana",
"cherry"]);
fruits.subscribe(fruit => this.next(fruit));
【问题讨论】:
标签: angular rxjs observable next subscribe