Angularjs 有可能在角引导弹出标题中使用html吗?

Angularjs 有可能在角引导弹出标题中使用html吗?,angularjs,twitter-bootstrap,Angularjs,Twitter Bootstrap,我正在尝试使用HTML在angular bootrap中的popover窗口中设置标题样式,但它显示为纯文本 因为popover主体可以包含HTML样式,所以我认为这会起作用 <!doctype html> <html ng-app="popover.title.html"> <head> <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.5.8/angular.js">&

我正在尝试使用HTML在angular bootrap中的popover窗口中设置标题样式,但它显示为纯文本

因为popover主体可以包含HTML样式,所以我认为这会起作用

<!doctype html>
<html ng-app="popover.title.html">
  <head>
    <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.5.8/angular.js"></script>
    <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.5.8/angular-animate.js"></script>
    <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.5.8/angular-sanitize.js"></script>
    <script src="//angular-ui.github.io/bootstrap/ui-bootstrap-tpls-2.2.0.js"></script>
    <script src="example.js"></script>
    <link href="//netdna.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
  </head>
  <body>
<script type="text/javascript">
  angular.module('popover.title.html', ['ngAnimate', 'ngSanitize', 'ui.bootstrap']);
angular.module('popover.title.html').controller('htmlTitleCtrl', function ($scope, $sce) {
  $scope.htmlPopover = $sce.trustAsHtml('<b style="color: red">I can</b> have <div class="label label-success">HTML</div> content');
});
</script>
<div ng-controller="htmlTitleCtrl">
    <div style="padding-top: 15em; padding-left: 7em;">
      <button uib-popover-html="htmlPopover" popover-title="This is in <span style='color:red;'>red</span>" class="btn btn-default">HTML Popover</button>
    </div>
</div>
  </body>
</html>

angular.module('popover.title.html',['ngAnimate','ngSanitize','ui.bootstrap']);
angular.module('popover.title.html')。controller('htmlitlectrl',function($scope,$sce){
$scope.htmlpover=$sce.trustAsHtml('I can have HTML content');
});
HTML流行音乐
运行PRUNKR:


可以在标题中正确显示颜色吗?

使用的Popor的标题
ng bind
,该标题设置标题元素的
文本内容
(,)。这意味着标题中的HTML代码不会呈现为HTML

但是,您可以使用CSS设置popover标题的样式