I am trying to get a Bootstrap 3 popover to display an Angular 2 interpolated template. Is this possible? Here is what I have so far:
$('.ba-header--user-menu').popover({
placement: 'bottom',
toggle: 'popover',
trigger: 'focus',
html: true,
content: '{{user.email}}'
});
Which gives me this:
The Popover plugin is similar to tooltips; it is a pop-up box that appears when the user clicks on an element. The difference is that the popover can contain much more content. Tip: Plugins can be included individually (using Bootstrap's individual "popover. js" file), or all at once (using "bootstrap.
Angular Popover with Bootstrap 4 & Material Design UI Popover is similar to tooltips; it is a pop-up box that appears when a user clicks or hovers on an element. Popovers whose both title and content are zero-length are never displayed. Examples. API.
JQuery and Angular don't play very well together. Install ng2-popover:
npm i ng2-popover
and use it like this:
<span popover="content to be shown in the popover">
element on which this popover is applied.
</span>
You can also try a library I published ng2-pop-over (not to be confused with ng2-popover mentioned above). It is compact and you'll have to add your styles but has what it takes to solve your problem without jQuery.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With