Reference to an open popover.
Returned by PopoverService.openPopover and injected into the content component. Similar to ModalRef but for non-modal popovers anchored to an element.
readonly popoverRef = inject(PopoverRef<string>);selectItem(item: string): void { this.popoverRef.close(item);} Copy
readonly popoverRef = inject(PopoverRef<string>);selectItem(item: string): void { this.popoverRef.close(item);}
Readonly
Observable that emits the result value when the popover closes, then completes. Emits undefined on light-dismiss.
undefined
Whether the popover has already been closed.
Close the popover, optionally returning a result value.
Optional
Reference to an open popover.
Returned by PopoverService.openPopover and injected into the content component. Similar to ModalRef but for non-modal popovers anchored to an element.
Example