angular2-busy not working when calling Observer.error()
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(){
this.busyConfigSettings = {
delay: 0,
minDuration: 0,
message: 'loading...',
busy: null,
}
this.busyConfigSettings.busy = this.generateObservable().subscribe(
() => { // success
console.log('logic for success');
},
() => { // error
console.log('logic for error');
},
() => { // complete
console.log('logic for compelete');
});
}
generateObservable(): Observable
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.