I have a problem with returning a value using the angular-ui-bootstrap. I have a function to return the result of each tooltip dynamically in a table the problem is that whenever I return the $ sce.trustAshtml of a function it just does not work.
<head lang="en">
<title>uib-tooltip-html test</title>
<link href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.1/angular.js"></script><scriptsrc="https://angular-ui.github.io/bootstrap/ui-bootstrap-tpls-0.14.3.js"></script>
<script>
var app = angular.module("test", ['ui.bootstrap']).config(function($sceProvider) {
$sceProvider.enabled(false);
});
app.controller("testController", function($scope, $http, $interval, $sce) {
$scope.text = $sce.trustAsHtml('<div>Some text</div>');
$scope.text1 = function teste(){
var text = $sce.trustAsHtml('<div>Some text</div>');
return text;
};
});
</script>
</head>
<body>
<div ng-app="test" ng-controller="testController">
<p style="margin-top: 5em;" uib-tooltip-html="text" >
A Thing With an HTML Tooltip
</p>
<p style="margin-top: 5em;" uib-tooltip-html="text1" >
A Thing With an HTML Tooltip
</p>
<p style="margin-top: 5em;" uib-tooltip="text1" >
A Thing With a Tooltip without html
</p>
</div>