I am writing an Angular application and I have an HTML response I want to display.
(我正在编写Angular应用程序,并且要显示HTML响应。)
How do I do that?
(我怎么做?)
If I simply use the binding syntax {{myVal}}
it encodes all HTML characters (of course). (如果我仅使用绑定语法{{myVal}}
它将对所有HTML字符进行编码(当然)。)
I need somehow to bind the innerHTML
of a div
to the variable value.
(我需要以某种方式将div
的innerHTML
绑定到变量值。)
ask by Aviad P. translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…