Javascript AngularJS:ng绑定html中的工具提示html不安全
我被《盗梦空间》的一个问题困住了:Javascript AngularJS:ng绑定html中的工具提示html不安全,javascript,html,angularjs,angular-ui,Javascript,Html,Angularjs,Angular Ui,我被《盗梦空间》的一个问题困住了: <!-- html --> <div class="well well-small" ng-bind-html="annotation"></div> -- //Javascript $scope.annotation=$scope.content; 为了(用文字表达){ 变量工具提示=“”+ “”+字[it].info+“”+ “”+单词[it]。名称+”“+ “”+单词[it]。lol+””+ “”; $scope
<!-- html -->
<div class="well well-small" ng-bind-html="annotation"></div>
--
//Javascript
$scope.annotation=$scope.content;
为了(用文字表达){
变量工具提示=“”+
“- ”+字[it].info+“
”+
“- ”+单词[it]。名称+”
“+
“- ”+单词[it]。lol+”
”+
“
”;
$scope.annotation=$scope.annotation.replace(words[it].label,“+words[it].label+”);
}
所以,基本上,注释得到一个字符串,我循环使用“words”来替换“annotation”中的表达式,但使用包含信息列表(ul)的工具提示
然而,即使内容以蓝色下划线(如链接)出现,我也找不到工具提示
有人知道我的问题在哪里吗
非常感谢 由于没有人能够回答这个问题(而且似乎还没有解决方案),我找到了另一种在工具提示中创建列表的方法,而没有工具提示: 基本上你用的是so而不是
'<li>' + words[i] + '</li>'
其中#187;代表»和#10;换一条新线路
希望我旁边的两个想要一个anwser的人都满意了,否则,也许我们可以进一步讨论这个问题。仍然没有答案。我开始认为这是不可能的。
'<li>' + words[i] + '</li>'
'»' + words[i] + ' '