You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a related issue open for passing custom content to the hide method for the ModalService (#2330). Although popovers do not currently have a service (maybe they should?), we should still be able to pass custom content to the show method of the PopoverDirective, similarly to how ng-bootstrap does: https://ng-bootstrap.github.io/#/components/popover/api
A use case for this is facility in writing plugins for third-party apps, such as ngx-tour. I think there is a way around this by using anonymous arrow functions, but have not tested it yet. Either way, it would make life a lot easier if this were possible.
Versions of ngx-bootstrap, Angular, and Bootstrap:
In case it helps anyone, my workaround in the meantime was to set it like this, using popoverContext:
this.popover = this.template; // Some popover template.
this.popoverContext = { data }; // Some content being passed to the popover
this.popoverTitle = this.title; // Some title for the popover
YevheniiaMazur
changed the title
Allow passing custom data to show() method for popovers
feat(popover): allow passing custom data to show() method for popovers
Jan 15, 2018
Bug description or feature request:
There is a related issue open for passing custom content to the
hide
method for the ModalService (#2330). Although popovers do not currently have a service (maybe they should?), we should still be able to pass custom content to theshow
method of thePopoverDirective
, similarly to how ng-bootstrap does: https://ng-bootstrap.github.io/#/components/popover/apiA use case for this is facility in writing plugins for third-party apps, such as ngx-tour. I think there is a way around this by using anonymous arrow functions, but have not tested it yet. Either way, it would make life a lot easier if this were possible.
Versions of ngx-bootstrap, Angular, and Bootstrap:
ngx-bootstrap: 1.9.1
Angular: 4.4.2
Build system: Angular CLI, System.js, webpack, starter seed:
Angular-CLI: 1.2.x
The text was updated successfully, but these errors were encountered: