【发布时间】:2016-01-17 15:47:39
【问题描述】:
如果我尝试同时使用 ng-sanitize 的 linky 过滤器和 ng-bind-html 指令,它将转换初始字符串
Well, <b>this is bold</b>, but this should become link http://www.example.com Lets test it!
链接转换为 html 链接,但没有粗体文本 - 它将作为包含标签的文本输出。
这里是[DEMO]
我的问题是我如何获得粗体文本和普通 html 链接的结果,如果最初我的字符串中包含一些被标签和看起来像链接的文本包围的文本??
【问题讨论】:
-
为什么不用标签包裹链接?
-
因为我现在知道有一个链接。假设给定的初始字符串。
标签: angularjs ng-bind-html ngsanitize