let foo = new BehaviorSubject<any>([ { id: '1', name: 'Yin' }, { id: '2', name: 'Yang' } ]); let bar = foo.getValue(); console.log(bar); foo.next(1); let baz = foo.getValue(); console.log(baz);
No comments:
Post a Comment