Angular UI Components for jQWidgets

Angular is a development platform for building mobile and desktop web applications. It provides a way to build apps for any deployment target by reusing existing code. Using HTML as the template language, Angular offers developers the possiblity to create their own components.


Note: Make sure that you are running on the latest Node.js and npm versions.


  1. Create your project folder structure
  2. Configurate and install all required packages
  3. Build the app

Step 1 - Create your root project folder

The root folder contains a few configuration files and the app folder which holds the main content of the application.


Note: Structure may vary based on your application needs.

Step 2 - Install and configurate all required packages

Apart from the package.json and tsconfig.json you will need tsconfig.aot.json and webpack.config.js files.
The tsconfig.aot.json is a normal tsconfig.json file, but with AoT-oriented settings.
Let's take a look at the config files:


When we type npm start in our CLI it executes both the commands. We just need to include the bundled file in or HTML and run it.

Here we have also added a watch command, which executes start on every save we make in a .ts/.css/htm file.



What's really new is the ngc section called angularCompilerOptions. Here we say to the compiler to skip generating metadata files. We have also set genDir which means all of our recompiled files will go in that folder. For more information about AOT please refer to the official Ahead-Of-Time Compilation CookBook.


For more information about Webpack please refer to the official guide.

Step 3 - Build the app

I. index.html

Add the needed references and the <app-root></app-root> tag to the body of index.html. That's the tag where we initialize the main component.
Then import the bundled file we received after running the npm start command.

II. app.module.ts

III. main.ts

IV. app.component.ts


@Component decorator:

The Class:

In the above example we create the widget through attributes.
There is another way through method called createComponent. It takes just one argument - an object containing the settings for the widget.

Events Methods & Properties

I. Events

Event Names in the Angular Components are the same as the Event Names in the Javascript Widgets.
The only thing you need to do is to put "on" before the Javascript widget event name and upperCase it's first letter.

II. Methods & Properties

Every widget also have a method setOptions which accepts an object as an argument. This object contains widget settings.

Two Way Data Binding

We often want to both display a data property and update that property when the user makes changes.
Let's take a look at the following example:

IV. app.component.ts


If you are using any of the Input based widgets like jqxInput, jqxComplexInput, jqxDateTimeInput and so on you must import the FormsModule in your app.module.ts file and add it to the @NgModel imports: