Skip to content

Distincts loaders should be both switch on at the same time #6

Open
@Albejr

Description

@Albejr

Steps:

  1. Show loaders '1' and '2'
  2. Get peoples data and hide loader '1'
  3. 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.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions