I would like to turn on my loader icon (e.g. spinner) isLoaderEnabled
when data starts to download from API and turn it off when successfully received. What wou
getList() {
this._http.get('../fake-data/someFile.json')
.map(response => response.json())
.do(val => this.spinner = true)
.subscribe(
data => {
this.dataStore.meetingList = data;
this.meetingListObserver.next(this.dataStore.meetingList);
},
err => console.log('>>>', 'Could not load meetings list. Error: ', err),
() => this.spinner = false)
);
}