字符串'<span style="color: red">x</span><br>'通过[innerHTML]绑定到页面上展示不显红色是什么原因?

图片说明图片说明图片说明

用的angular,为什么过时的font标签有用反而第二行不红呢?第三行直接写在html中也可以变红

好像默认会把 style属性过滤掉
https://stackoverflow.com/questions/39628007/angular2-innerhtml-binding-remove-style-attribute

你这写法不规范啊,应该是
log="...... < /span>"最外层用双引号,里面遇到需要双引号的改为单引号。