📜  发出可观察到的新值 - 无论代码示例

📅  最后修改于: 2022-03-11 14:59:24.583000             🧑  作者: Mango

代码示例1
const observable = new BehaviorSubject("initial value");

observable.subscribe({
    next: (value) => console.log("The value is: ", value)
});

observable.next("a new value");