javascript - Dynamically changing angular-tooltips content on form errors -
i trying integrate angular-tooltips input form. want change tooltip text on registrationform.email.$error
object change.
html:
<input tooltips tooltip-html="{{ emailtooltip }}" tooltip-show-trigger="focus" tooltip-hide-trigger="blur" tooltip-side="right"/> <div>{{emailtooltip}}</div>
controller:
$scope.emailtooltip = 'initial tooltip'; $scope.$watch('registrationform.email.$error', function (newval) { $scope.emailtooltip = 'updated tooltip'; }}, true);
above code changes <div>
value doesn't change <input>
's 'tooltip-html' attribute value. missing or bug?
i using angular-tooltips library https://github.com/720kb/angular-tooltips
you should use
tooltip-title="{{ emailtooltip }}"
instead of
tooltip-html="{{ emailtooltip }}"
Comments
Post a Comment