passman/js/app/directives/tooltip.js
2016-09-14 15:09:55 +02:00

24 lines
444 B
JavaScript

'use strict';
/**
* @ngdoc directive
* @name passmanApp.directive:passwordGen
* @description
* # passwordGen
*/
angular.module('passmanApp')
.directive('tooltip', ['$window', function ($window) {
return {
restrict: 'A',
scope: {
tooltip: '=tooltip'
},
link: function (scope, el, attr, ctrl) {
scope.$watch('tooltip', function(){
$(el).attr('title', scope.tooltip);
$(el).tooltip()
})
}
};
}]);