-
Notifications
You must be signed in to change notification settings - Fork 6.7k
$tooltipProvider - how do I actually use setTriggers() ? #625
Comments
@franciscopreller Sends us a plunker (http://plnkr.co/) with what you've tried so far. Also, since this is a question, it should be asked on the mailing list ([email protected]). |
Thanks, will move it to google groups then, was unsure where else to get help. |
@franciscopreller Did you ever figure out how to properly use setTriggers()? I looked for your post on Google Groups but wasn't able to find it. |
@baconmania Hey, yes I did. Was something simple like updating from an old version. Became apparent when I set it up on plunker exactly the same and it worked as it should have. |
Francis, could you please provide your plunker? I believe I need the same functionality. |
I spent some time today researching how to set up ui-bootstrap triggers to respond to custom events for my project, so I threw what I found into a plunker: http://plnkr.co/edit/0wEqzz?p=preview . In my case, I needed to be able to trigger a popup on element A when hovering the mouse over element B. |
@courtneyfaulkner, that was super helpful to me, thanks very much! |
@courtneyfaulkner, you are a wizard! thank you so much for putting your effort into that plunker, it is extremely helpful) thanks a bunch! |
Happy to help. :) |
@courtneyfaulkner perfect demo :) |
@courtneyfaulkner Is it actually necessary to name also the default triggers? I think the given object is extending the default one. So this should work:
|
@Elijen No, it's not necessary. The default trigger map
will be extended with the attributes in .setTriggers(). |
@courtneyfaulkner Thank you so much for the Plunkr demo, very helpful to us Angular n00bs |
@courtneyfaulkner thanks alot! great plnkr. In my case i had to trigger the popover to close when selecting an item inside the popover. |
Thx, @courtneyfaulkner. |
I'm happy I could help. :) |
The plunler is broken with the 0.13.4 release of the 3 september 2015. Use popover-is-open instead |
Ah, interesting. I was reading your issue #4364, @cyrilgandon, and spent some time with uib 0.14.1 in plunkr. I was able to get a custom event to fire the uib-tooltip once by using |
@courtneyfaulkner |
The documentation states that I am able to set new triggers using the $tooltipProvider and setTriggers() method, however I have so far been unable to achieve this.
I have included this in my module config:
$tooltipProvider.setTriggers({ 'inputInvalid' : 'inputValid' });
However it does not find the method. I dived into the source and see the method there, but it's tossed inside a $get method which then returns the dependencies. Perhaps I am doing something wrong here and I simply do not understand how to get the $tooltipProvider to work?
The text was updated successfully, but these errors were encountered: