Angular UI Components Documentation
This tutorial sets up jQWidgets in a new Angular CLI project by hand and shows a jqxBarGauge. It explains each change the setup makes, so you know what to check in an existing project.
If you want the CLI to make these changes for you, use ng add jqwidgets-ng instead; see Angular CLI and jqwidgets-ng.
Angular 22 needs a current Node.js LTS release (Node 22 or later). Check your version, then install the CLI globally so the ng command is available everywhere.
node -v
npm install -g @angular/cli
ng new jqwidgets-angular-cli-app
cd jqwidgets-angular-cli-app
Answer No when the CLI asks about server-side rendering. jQWidgets components draw in the browser DOM, so a client-rendered app is the simplest start.
npm install jqwidgets-ng
The package contains the Angular components and the jQWidgets runtime they use, in its jqwidgets/ folder. There is nothing else to install, and no TypeScript files to add to tsconfig.json: the components ship compiled, with type definitions.
Open angular.json and add the base stylesheet and one theme to the styles array of the build target. The base stylesheet holds the layout rules every widget needs; the theme sets colours and fonts.
"styles": [
"node_modules/jqwidgets-ng/jqwidgets/styles/jqx.base.css",
"node_modules/jqwidgets-ng/jqwidgets/styles/jqx.material.css",
"src/styles.css"
]
Restart ng serve after editing angular.json; the dev server reads it only on start.
Components in Angular 22 are standalone, so there is no module file to edit. Import jqxBarGaugeModule in the component that uses <jqxBarGauge>.
src/app/app.ts:
import { Component, viewChild } from '@angular/core';
import { jqxBarGaugeComponent, jqxBarGaugeModule } from 'jqwidgets-ng/jqxbargauge';
@Component({ selector: 'app-root', imports: [jqxBarGaugeModule], templateUrl: './app.html' })
export class App {
readonly myBarGauge = viewChild.required<jqxBarGaugeComponent>('myBarGauge');
readonly values = [102, 115, 130, 137];
randomize(): void {
this.myBarGauge().val(this.values.map(() => Math.round(Math.random() * 150)));
}
}
src/app/app.html:
<jqxBarGauge #myBarGauge
[theme]="'material'"
[width]="600"
[height]="600"
[max]="150"
[colorScheme]="'scheme02'"
[values]="values">
</jqxBarGauge>
<button type="button" (click)="randomize()">New values</button>
The CLI already starts the app from src/main.ts with bootstrapApplication(App, appConfig), so you do not change that file. Projects created before Angular 20 name the files app.component.ts and app.component.html and the class AppComponent.
ng serve
Open http://localhost:4200/ to see four bars. The button calls the gauge's val method through the signal query.
styles array and restart ng serve.jqxBarGaugeModule to the imports of the component whose template uses the tag.Next: the same setup with a data grid or a chart, or the Bar Gauge getting started page. More examples: jQWidgets Angular demos.