Why is onShow not working in my angular-strap popover?

25 Views Asked by At

I'm developing an AngularJS application that uses Angular-Strap. I'm using the Angular-Strap documentation as a guide:

https://mgcrea.github.io/angular-strap/

If you follow that link and scroll down to the Popover section, you'll see a table of options, some of which are event handlers. For example, it says that onShow is a function that, "if provided, this function will be invoked after the popover is shown."

However, when I try to set the onShow handler in my code like this...

var popover = $popover($(nameEl), {
    placement: 'top',
    container: 'body',
    html: true,
    trigger: 'hover',
    content: tooltipHTML,
    onShow: function() {
        console.log('onShow'); 
    }
});

...it doesn't respond. I hover over the element it is attached to, I see the popover, but 'onShow' does not print to the console. I put a breakpoint on console.log('onShow'); and it doesn't get hit.

We're using an older version of Angular-Strap (2.1.3) but I can't seem to find any documentation on this version anywhere, nothing that will tell me whether onShow is an event hook for the popover of that version.

Your help is much appreciated.

0

There are 0 best solutions below