The Loader component for Angular represents a widget which displays the built-in loading element. The loading element can be icon only, text only or combination of icon and text. It can be used to display loading element until the widget's data is loaded.
npm install -g @angular/cli ng new jqwidgets-project cd jqwidgets-project
ng add jqwidgets-ng
jQWidgets UI for Angular is distributed as jqwidgets-ng NPM package
npm install jqwidgets-ng
@import 'jqwidgets-ng/jqwidgets/styles/jqx.base.css';
"styles": [ "node_modules/jqwidgets-ng/jqwidgets/styles/jqx.base.css" ]
<jqxLoader [theme]="'fluent'" #jqxLoader
[imagePosition]="'top'"
[width]="100"
[height]="60">
</jqxLoader>
<jqxButton [theme]="'fluent'" #openLoader
(onClick)="openLoaderClick($event)"
[width]="150">
Open Loader
</jqxButton>
<jqxButton [theme]="'fluent'" #closeLoader
(onClick)="closeLoaderClick($event)"
[width]="100">
Close
</jqxButton>
import { Component, ViewChild } from '@angular/core';
import { jqxButtonComponent, jqxButtonModule } from 'jqwidgets-ng/jqxbuttons';
import { jqxLoaderModule, jqxLoaderComponent } from 'jqwidgets-ng/jqxloader';
@Component({
selector: 'app-root',
imports: [jqxLoaderModule, jqxButtonModule],
standalone: true,
templateUrl: './app.component.html'
})
export class AppComponent {
@ViewChild('jqxLoader') jqxLoader: jqxLoaderComponent;
openLoaderClick(event: any): void {
this.jqxLoader.open();
};
closeLoaderClick(event: any): void {
this.jqxLoader.close();
};
}