12345678910111213 |
- import { Subject } from "rxjs";
- let testSubject: Subject<any> = new Subject()
- testSubject.next({test: 'See how long this take'})
- setTimeout(() => {
- testSubject.subscribe(e => console.log(e.test))
- }, 2000)
- setTimeout(() => {
- testSubject.next({test: 'too late'})
- }, 4000)
|