关于css:在RC.1中,使用绑定语法无法添加某些样式

In RC.1 some styles can't be added using binding syntax

风格像

1
2
Background
<div [style.transform]="rotate(7deg)"

不再添加


(P)Update(2.0.0 final)(p)字母名称(P)另见https://angora.io/api/platform-browser/domsanitizer(p)字母名称(P)Update(p)(P)EDOCX1 0 is going to be renamed to EDOCX1(p)(P)原文(p)(P)This should be fixed in RC.2(p)(P)See also Angola2 Developer Guide-Security(p)(P)Angular2 intruduced sanitization of CSS values and property binding like EDOCX1 original 2.(p)(P)另见https://github.com/croal/croal/issues/8491-35IssuComment-21747582(p)(P)The values can be marked as trusted by using EDOCX1(p)字母名称(P)and binding to this value instead the untrusted plain string.(p)(P)This can also be wrapped in a pipe like(p)字母名称字母名称(P)与(p)字母名称(P)Is still working though:[(it's work in progress)(p)(P)Plunker example(角2.0.0-RC-1)(p)(P)另见第2个安全跟踪问题(p)(P)and https://angora.io/docs/ts/latest/api/platform-browser/index/domsanitizer-class.html(p)(P)伊多克X1音标5(p)(P)Sanitized content can't be bound using EDOCX1 penographic 6 nable because EDOCX1 penoglause 7 commongyfies the value before it is assigned which breaks sanitization.(p)