Angular ui bootstrap uib-tooltip show on custom trigger

I have this tooltip in the input field:

<input id="chatMsg" uib-tooltip="something" tooltip-trigger="openTrigger" ng-model="chatMsg" /> 

and I want to show it on the custum trigger as follows:

 angular.element('#chatMsg').trigger('openTrigger'); 

but I can not get it to work, on my previous versions of ui-bootstrap-tpls it worked (0.12.1) now I upgraded to 0.14.3

I also configured the provider as follows:

 app.config(['$uibTooltipProvider', function ($uibTooltipProvider) { $uibTooltipProvider.setTriggers({ 'openTrigger': 'closeTrigger' }); }]); 

Thanks.

+6
source share
1 answer

Starting with version 0.12.0, the tooltip trigger is no longer observed (therefore, you cannot change it programmatically).

You can use the tooltip to get the same behavior. See here for more details: https://github.com/angular-ui/bootstrap/issues/3372

0
source

Source: https://habr.com/ru/post/1237354/


All Articles