0
這是一個簡單的問題。
$scope.text = "<strong>this is text</strong>"
它輸出這樣的事情
{{text}}
<strong>this is text</strong>
代替
這是文本
這是一個簡單的問題。
$scope.text = "<strong>this is text</strong>"
它輸出這樣的事情
{{text}}
<strong>this is text</strong>
代替
這是文本
<span ng-bind-html="text"></span>
檢查NG綁定,HTML指令 不要忘記添加angular-sanitize.js
檔案