我使用 Angular 9.1.6 为公共回购做出了贡献,语法如下
<div [style.--color-success]="'green'" >This is a div</div>
我得到了一个这样的编译html
<div style="--color-success:green" >This is a div</div>
这已合并,现在我在当前项目中使用 angular 9.1.0 的该组件,并且我编译的 html 忽略了自定义属性,尽管它保留了 style 属性
<div style>This is a div</div>
然后我尝试了这种语法
<div [style.--color-success]="'green'" style="--color-mid:orange">This is a div</div>
使用一种语法而不是另一种语法给出编译后的 html
<div style="--color-mid:orange" >This is a div</div>
是否有任何角度配置会阻止使用这种语法?