Open
Description
Steps:
- Show loaders '1' and '2'
- Get peoples data and hide loader '1'
- Get pets data and hide loader '2'
this.loadingMaskService.showGroup('loaderGroup1');
this.loadingMaskService.showGroup('loaderGroup2');
this.http.get('/api/people').subscribe(p => {
this.loadingMaskService.hideGroup('loaderGroup1');
this.http.get('/api/pet').subscribe(a => {
this.loadingMaskService.hideGroup('loaderGroup2');
});
});
<div class="card" [ngxLoadingMask]="'loaderGroup1'">
PEOPLE CONTENT
</div>
<div class="card" [ngxLoadingMask]="'loaderGroup2'">
ANIMAL CONTENT
</div>
Only the first loader '1' works, the second '2' is not displayed.