generateObservable(): Observable{
return Observable.create((observer: Observer) => {
observer.error("Notify about error, expecting loader to be hidden after this.");
// observer.next(null);
observer.complete();
}).delay(5000);
}
}
`
calling Observer.next is working as expected, but when trying to call observer error, loading isn't showing at all, and sometimes I got exception regarding the change detection for Angular.
Hi,
I'm having the following code testing the module:
`import { Component, OnInit } from '@angular/core'; import { Subscription } from "rxjs/Subscription"; import { Observable } from "rxjs/Observable"; import { Observer } from "rxjs/Observer"; import { IBusyConfig } from "angular2-busy"; import 'rxjs/add/operator/delay';
@Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export class AppComponent implements OnInit { busyConfigSettings: IBusyConfig busy: Subscription; ngOnInit(){
}
generateObservable(): Observable{
return Observable.create((observer: Observer) => {
observer.error("Notify about error, expecting loader to be hidden after this.");
// observer.next(null);
observer.complete();
}).delay(5000);
}
}
`
calling Observer.next is working as expected, but when trying to call observer error, loading isn't showing at all, and sometimes I got exception regarding the change detection for Angular.
Any help? seems not supported.