Angular UI Components Documentation
The Angular Loader shows a loading indicator over the page or an element. This guide adds the Angular Loader (jqxLoader) to an app, then shows how to set its options and call its methods.
jqwidgets-ngjqwidgets-ng/jqxloader 
In an Angular project (to start one, see Getting started with Angular), add the package with the Angular CLI. It asks for a theme and adds the styles to angular.json:
ng add jqwidgets-ng
Components are standalone: add jqxLoaderModule to the imports of the component that uses it.
import { Component } from '@angular/core';
import { jqxLoaderModule } from 'jqwidgets-ng/jqxloader';
@Component({
selector: 'app-root',
imports: [jqxLoaderModule],
templateUrl: './app.html'
})
export class App {}
The source of the live Default Functionality demo.
<jqxLoader #jqxLoader
[imagePosition]="'top'"
[width]="100"
[height]="60">
</jqxLoader>
<jqxButton #openLoader
(onClick)="openLoaderClick($event)"
[width]="150">
Open Loader
</jqxButton>
<jqxButton #closeLoader
(onClick)="closeLoaderClick($event)"
[width]="100">
Close
</jqxButton>
import { Component, viewChild } from '@angular/core';
import { jqxLoaderComponent } from 'jqwidgets-ng/jqxloader';
import { CommonModule } from '@angular/common';
import { jqxLoaderModule } from 'jqwidgets-ng/jqxloader';
import { jqxButtonModule } from 'jqwidgets-ng/jqxbuttons';
@Component({
imports: [CommonModule, jqxLoaderModule, jqxButtonModule],
selector: 'app-root',
templateUrl: './app.html'
})
export class App {
readonly jqxLoader = viewChild.required<jqxLoaderComponent>('jqxLoader');
openLoaderClick(event: any): void {
this.jqxLoader().open();
}
closeLoaderClick(event: any): void {
this.jqxLoader().close();
}
}
Options are inputs, bound with [name]="value".
Get the component with a signal query and call its methods. For example, open: Opening/showing the current loader.
<jqxLoader #myLoader></jqxLoader>
import { Component, viewChild } from '@angular/core';
import { jqxLoaderModule, jqxLoaderComponent } from 'jqwidgets-ng/jqxloader';
@Component({
selector: 'app-root',
imports: [jqxLoaderModule],
templateUrl: './app.html'
})
export class App {
readonly myLoader = viewChild.required<jqxLoaderComponent>('myLoader');
run(): void {
this.myLoader().open(200, 50);
}
}