Angular Popup - Specify Toolbar Items

The Popup has two toolbars: top and bottom. Items on these toolbars can be plain text or UI components. To configure the items, populate the toolbarItems array with objects. Each object configures an individual toolbar item. For example, the following code adds two toolbar items to the Popup: one is plain text, another is the Button UI component. They both occupy the top toolbar, because their toolbar property assumes its default value.

HTML
TypeScript
  • <dx-popup
  • title="Popup Title"
  • [(visible)]="isPopupVisible">
  • <dxi-popup-toolbar-item
  • text="Title"
  • location="before">
  • </dxi-popup-toolbar-item>
  • <dxi-popup-toolbar-item
  • widget="dxButton"
  • location="after"
  • [options]="{
  • text: 'Refresh',
  • onClick: refresh
  • }">
  • </dxi-popup-toolbar-item>
  • </dx-popup>
  • import { DxPopupModule, DxButtonModule } from "devextreme-angular";
  • // ...
  • export class AppComponent {
  • isPopupVisible: boolean = true;
  • refresh () {
  • // ...
  • }
  • }
  • @NgModule({
  • imports: [
  • // ...
  • DxPopupModule,
  • DxButtonModule
  • ],
  • // ...
  • })
See Also