Angular UI Components Documentation
The Angular DropDownList contains a list of selectable items displayed in a drop-down. This guide adds the Angular DropDownList (jqxDropDownList) to an app, then shows how to set its options, handle its events and call its methods.
jqwidgets-ngjqwidgets-ng/jqxdropdownlist 
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 jqxDropDownListModule to the imports of the component that uses it.
import { Component } from '@angular/core';
import { jqxDropDownListModule } from 'jqwidgets-ng/jqxdropdownlist';
@Component({
selector: 'app-root',
imports: [jqxDropDownListModule],
templateUrl: './app.html'
})
export class App {}
The source of the live Default Functionality demo.
<jqxDropDownList
[width]="200" [height]="30" [source]="source" [selectedIndex]="1">
</jqxDropDownList>
import { Component } from '@angular/core';
import { CommonModule } from '@angular/common';
import { jqxDropDownListModule } from 'jqwidgets-ng/jqxdropdownlist';
@Component({
imports: [CommonModule, jqxDropDownListModule],
selector: 'app-root',
templateUrl: './app.html'
})
export class App {
source: string[] = [
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Café Bombón',
'Café au lait',
'Caffé Corretto',
'Café Crema',
'Caffé Latte',
'Caffé macchiato',
'Café mélange',
'Coffee milk',
'Cafe mocha',
'Cappuccino',
'Carajillo',
'Cortado',
'Cuban espresso',
'Espresso',
'Eiskaffee',
'The Flat White',
'Frappuccino',
'Galao',
'Greek frappé coffee',
'Iced Coffee',
'Indian filter coffee',
'Instant coffee',
'Irish coffee',
'Liqueur coffee'
];
}
Options are inputs, bound with [name]="value".
Events are outputs named on plus the event name with a capital first letter. For example, change: This event is triggered when the user selects an item.
<jqxDropDownList (onChange)="onChange($event)"></jqxDropDownList>
onChange(event: any): void {
console.log(event.args);
}
Get the component with a signal query and call its methods. For example, val: Gets the selected value.
<jqxDropDownList #myDropDownList></jqxDropDownList>
import { Component, viewChild } from '@angular/core';
import { jqxDropDownListModule, jqxDropDownListComponent } from 'jqwidgets-ng/jqxdropdownlist';
@Component({
selector: 'app-root',
imports: [jqxDropDownListModule],
templateUrl: './app.html'
})
export class App {
readonly myDropDownList = viewChild.required<jqxDropDownListComponent>('myDropDownList');
run(): void {
const value = this.myDropDownList().val();
console.log(value);
}
}