Angular UI Components Documentation
The Angular Expander is a collapsible panel with a header and content. This guide adds the Angular Expander (jqxExpander) to an app, then shows how to set its options, handle its events and call its methods.
jqwidgets-ngjqwidgets-ng/jqxexpander 
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 jqxExpanderModule to the imports of the component that uses it.
import { Component } from '@angular/core';
import { jqxExpanderModule } from 'jqwidgets-ng/jqxexpander';
@Component({
selector: 'app-root',
imports: [jqxExpanderModule],
templateUrl: './app.html'
})
export class App {}
The source of the live Default Functionality demo.
<jqxExpander [width]="350">
<div>
Early History of the Internet
</div>
<div>
<ul>
<li>1961 First packet-switching papers</li>
<li>1966 Merit Network founded</li>
<li>1966 ARPANET planning starts</li>
<li>1969 ARPANET carries its first packets</li>
<li>1970 Mark I network at NPL (UK)</li>
<li>1970 Network Information Center (NIC)</li>
<li>1971 Merit Network's packet-switched network operational</li>
<li>1971 Tymnet packet-switched network</li>
<li>1972 Internet Assigned Numbers Authority (IANA) established</li>
<li>1973 CYCLADES network demonstrated</li>
<li>1974 Telenet packet-switched network</li>
<li>1976 X.25 protocol approved</li>
<li>1979 Internet Activities Board (IAB)</li>
<li>1980 USENET news using UUCP</li>
<li>1980 Ethernet standard introduced</li>
<li>1981 BITNET established</li>
</ul>
</div>
</jqxExpander>
import { Component } from '@angular/core';
import { CommonModule } from '@angular/common';
import { jqxExpanderModule } from 'jqwidgets-ng/jqxexpander';
@Component({
imports: [CommonModule, jqxExpanderModule],
selector: 'app-root',
templateUrl: './app.html'
})
export class App {}
Options are inputs, bound with [name]="value".
Events are outputs named on plus the event name with a capital first letter. For example, collapsing: This event is triggered when the jqxExpander is going to be collapsed.
<jqxExpander (onCollapsing)="onCollapsing($event)"></jqxExpander>
onCollapsing(event: any): void {
console.log(event.args);
}
Get the component with a signal query and call its methods. For example, expand: Method used for expanding the expander's content.
<jqxExpander #myExpander></jqxExpander>
import { Component, viewChild } from '@angular/core';
import { jqxExpanderModule, jqxExpanderComponent } from 'jqwidgets-ng/jqxexpander';
@Component({
selector: 'app-root',
imports: [jqxExpanderModule],
templateUrl: './app.html'
})
export class App {
readonly myExpander = viewChild.required<jqxExpanderComponent>('myExpander');
run(): void {
this.myExpander().expand();
}
}