])
})
)),
- finalize(() => this.loadingSubject.next(false)),
+ finalize(() => {
+ this.loadingSubject.next(false);
+ this.producerSubject.next(producers);
+ })
).subscribe(result => {
producers = result.map(producer => {
let producerObj = <Producer>{};
}
return producerObj;
});
- this.producerSubject.next(producers);
}, err => {
console.error("Subscribe function error:" + err);
});
}
+
+ hasProducers(): boolean {
+ return this.producersDataSource.data.length > 0;
+ }
+
}