ng-is-loading
v1.0.2
Published
##Module ``` @NgModule({ imports: [NgLoadingModule.forRoot()], ... }) export class AppModule {} ``` ##Component ``` @Component({ selector: "my-app", templateUrl: "./app.component.html", styleUrls: ["./app.component.css"] }) export class App
Downloads
3
Readme
#Usage
##Module
@NgModule({
imports: [NgLoadingModule.forRoot()],
...
})
export class AppModule {}
##Component
@Component({
selector: "my-app",
templateUrl: "./app.component.html",
styleUrls: ["./app.component.css"]
})
export class AppComponent {
@IsLoading(['short', 'long'])
public readonly isLoading$: Observable<boolean>;
@Loading('long')
public getLongApi() {
return api.post();
}
@Loading('short')
public getShortApi() {
return api.get();
}
}
You can use both decorators in any place of your application.
#Learn more
https://purecaesar.medium.com/requests-management-in-angular-7fd7b15a112e