I am working on my first Angular 2 product. I created this Observable.timer
and then subscribed to it. It polls the server for data.
How do I pause and unpause this?
ngOnInit(): void {
this.poll = Observable.timer(500,500).subscribe((t: any) => {
this.request.getRackList(+this.global.zoneId).subscribe(
incoming => this.import(incoming),
err => { this.global.err(err) }
);
})
this.canOpenClose = (this.global.mode === 2);
}