Код: Выделить всё
const someStuff = of(1, 2, 3);
const bs = new BehaviorSubject(4);
someStuff.subscribe(bs);
console.log(`bs: ${bs.getValue()}`); // output is 'bs: 3', as expected
const bs2 = new BehaviorSubject(5);
bs.subscribe(bs2);
console.log(`bs2: ${bs2.getValue()}`); // output is 'bs: 5', but I expect 'bs: 3'
Код: Выделить всё
3Подробнее здесь: https://stackoverflow.com/questions/798 ... that-behav
Мобильная версия