Angular Popover - Specify Toolbar Items
The Popover 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 Popover: 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
- <img id="image" src="https://url/to/an/image" />
- <dx-popover
- target="#image"
- showEvent="dxhoverstart"
- hideEvent="dxhoverend"
- [width]="200">
- <div *dxTemplate="let data of 'content'">
- <p>Popover content</p>
- </div>
- <dxi-popover-toolbar-item
- text="Title"
- location="before">
- </dxi-popover-toolbar-item>
- <dxi-popover-toolbar-item
- widget="dxButton"
- location="after"
- [options]="{
- text: 'Refresh',
- onClick: refresh
- }">
- </dxi-popover-toolbar-item>
- </dx-popover>
- import { DxPopoverModule, DxButtonModule } from "devextreme-angular";
- // ...
- export class AppComponent {
- refresh () {
- // ...
- }
- }
- @NgModule({
- imports: [
- // ...
- DxPopoverModule,
- DxButtonModule
- ],
- // ...
- })
See Also
Feel free to share topic-related thoughts here.
If you have technical questions, please create a support ticket in the DevExpress Support Center.
Thank you for the feedback!
If you have technical questions, please create a support ticket in the DevExpress Support Center.