Skip to content

Commit ecbbd9c

Browse files
committed
Add more spinner types
1 parent 1249441 commit ecbbd9c

File tree

5 files changed

+1326
-401
lines changed

5 files changed

+1326
-401
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,9 @@ export class AppModule { }
189189

190190
## Credits
191191

192-
* Tobias Ahlin for his spinkit
193-
* Matt Carter for his AngularJS `angular-ui-loader`
192+
* Tobias Ahlin - [CSS spinkit](https://github.com/tobiasahlin/SpinKit)
193+
* Daniel Cardoso - [Load awesome](https://github.com/danielcardoso/load-awesome)
194+
* Matt Carter - AngularJS `angular-ui-loader`
194195

195196
## License
196197

projects/ngx-ui-loader/src/lib/ngx-ui-loader-helper.service.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,9 @@ export class NgxUiLoaderHelperService {
129129
const foregroundRunning = this.hasForeground();
130130

131131
if (foreground) {
132+
if (this.waitingForeground[id]) {
133+
return { id: id, isForeground: foreground };
134+
}
132135
this.waitingForeground[id] = true;
133136
if (!foregroundRunning) {
134137
const backgroundRunning = this.hasBackground();
@@ -139,6 +142,9 @@ export class NgxUiLoaderHelperService {
139142
this._showForeground.next(true);
140143
}
141144
} else { // foreground == false
145+
if (this.waitingBackground[id]) {
146+
return { id: id, isForeground: foreground };
147+
}
142148
this.waitingBackground[id] = true;
143149
if (!foregroundRunning) {
144150
this._showBackground.next(true);

0 commit comments

Comments
 (0)