observable next error complete code example
Example: emit new value observable
const observable = new BehaviorSubject("initial value");
observable.subscribe({
next: (value) => console.log("The value is: ", value)
});
observable.next("a new value");