Angular UI Components Documentation
The Angular Popover shows a small overlay of secondary content next to an element when the element is clicked. This guide adds the Angular Popover (jqxPopover) to an app, then shows how to set its options, handle its events and call its methods.
jqwidgets-ngjqwidgets-ng/jqxpopover 
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 jqxPopoverModule to the imports of the component that uses it.
import { Component } from '@angular/core';
import { jqxPopoverModule } from 'jqwidgets-ng/jqxpopover';
@Component({
selector: 'app-root',
imports: [jqxPopoverModule],
templateUrl: './app.html'
})
export class App {}
The source of the live Default Functionality demo.
<div style="height: 33px; border: 1px solid lightgray; padding: 10px;" class="jqx-widget-header">
<div style="float: right">
<jqxButton #buttonReference id="button"
[width]="150" [height]="35" [template]="'inverse'">
View Employees
</jqxButton>
<jqxPopover [showCloseButton]="true" [selector]="'#button'" [title]="'Employees'"
[arrowOffsetValue]="50" [offset]="{ left: left, top: top }">
<div #employees></div>
</jqxPopover>
</div>
</div>
import { Component, AfterViewInit, ElementRef, viewChild } from '@angular/core';
import { jqxButtonComponent } from 'jqwidgets-ng/jqxbuttons';
import { CommonModule } from '@angular/common';
import { jqxPopoverModule } from 'jqwidgets-ng/jqxpopover';
import { jqxButtonModule } from 'jqwidgets-ng/jqxbuttons';
@Component({
imports: [CommonModule, jqxPopoverModule, jqxButtonModule],
selector: 'app-root',
templateUrl: './app.html'
})
export class App implements AfterViewInit {
readonly employees = viewChild.required<ElementRef>('employees');
top: number = 10;
left: number = -50;
ngAfterViewInit() {
let data = new Array();
let firstNames = [
'Nancy',
'Andrew',
'Janet',
'Margaret',
'Steven',
'Michael',
'Robert',
'Laura',
'Anne'
];
let lastNames = [
'Davolio',
'Fuller',
'Leverling',
'Peacock',
'Buchanan',
'Suyama',
'King',
'Callahan',
'Dodsworth'
];
let titles = [
'Sales Representative',
'Vice President, Sales',
'Sales Representative',
'Sales Representative',
'Sales Manager',
'Sales Representative',
'Sales Representative',
'Inside Sales Coordinator',
'Sales Representative'
];
for (let i = 0; i < firstNames.length; i++) {
let row: any = {};
row['firstname'] = firstNames[i];
row['lastname'] = lastNames[i];
row['title'] = titles[i];
let imgurl =
'https://www.jqwidgets.com/angular/images/' + firstNames[i].toLowerCase() + '.png';
let img = '<img height="50" width="45" src="' + imgurl + '"/>';
let table =
'<table style="min-width: 150px;"><tr><td style="width: 55px;" rowspan="2">' +
img +
'</td><td>' +
firstNames[i] +
' ' +
lastNames[i] +
'</td></tr><tr><td>' +
titles[i] +
'</td></tr></table>';
this.employees().nativeElement.innerHTML += table;
}
}
}Options are inputs, bound with [name]="value".
Events are outputs named on plus the event name with a capital first letter. For example, open: This event is triggered when the popover is opened.
<jqxPopover (onOpen)="onOpen($event)"></jqxPopover>
onOpen(event: any): void {
console.log(event.args);
}
Get the component with a signal query and call its methods. For example, open: Open the popover.
<jqxPopover #myPopover></jqxPopover>
import { Component, viewChild } from '@angular/core';
import { jqxPopoverModule, jqxPopoverComponent } from 'jqwidgets-ng/jqxpopover';
@Component({
selector: 'app-root',
imports: [jqxPopoverModule],
templateUrl: './app.html'
})
export class App {
readonly myPopover = viewChild.required<jqxPopoverComponent>('myPopover');
run(): void {
this.myPopover().open();
}
}