diff --git a/src/js/angular-tooltips.js b/src/js/angular-tooltips.js index 60778df..4425314 100644 --- a/src/js/angular-tooltips.js +++ b/src/js/angular-tooltips.js @@ -31,8 +31,8 @@ return options; }; }) - .directive('tooltips', ['$window', '$compile', '$interpolate', '$interval', 'tooltipsConfig', - function manageDirective($window, $compile, $interpolate, $interval, tooltipsConfig) { + .directive('tooltips', ['$window', '$compile', '$interpolate', '$interval', '$sce', 'tooltipsConfig', + function manageDirective($window, $compile, $interpolate, $interval, $sce, tooltipsConfig) { var TOOLTIP_SMALL_MARGIN = 8 //px , TOOLTIP_MEDIUM_MARGIN = 9 //px @@ -98,11 +98,17 @@ } htmlTemplate = htmlTemplate + '
' + INTERPOLATE_START_SYM + 'title' + INTERPOLATE_END_SYM + '
' + - INTERPOLATE_START_SYM + 'content' + INTERPOLATE_END_SYM + html + ' ' + - ''; + INTERPOLATE_START_SYM + 'content' + INTERPOLATE_END_SYM + + ' ' + + ' ' + ''; $scope.title = title; $scope.content = content; $scope.html = html; + + $scope.getHtml = function(){ + return $sce.trustAsHtml($scope.html); + }; + //parse the animation speed of tooltips $scope.parseSpeed = function parseSpeed() {