This patch is a final major refactor in styling Angular. This PR includes three main fixes: All temporary state taht is persisted between template style/class application and style/class application in host bindings is now removed. Removes the styling() and stylingApply() instructions. Introduces a "direct apply" mode that is used apply prop-based style/class in the event that there are no map-based bindings as well as property collisions. PR Close #32259 PR Close #32596
This commit is contained in:
@ -61,9 +61,7 @@ export interface SafeResourceUrl extends SafeValue {}
|
||||
|
||||
|
||||
abstract class SafeValueImpl implements SafeValue {
|
||||
constructor(public changingThisBreaksApplicationSecurity: string) {
|
||||
// empty
|
||||
}
|
||||
constructor(public changingThisBreaksApplicationSecurity: string) {}
|
||||
|
||||
abstract getTypeName(): string;
|
||||
|
||||
@ -89,10 +87,10 @@ class SafeResourceUrlImpl extends SafeValueImpl implements SafeResourceUrl {
|
||||
getTypeName() { return BypassType.ResourceUrl; }
|
||||
}
|
||||
|
||||
export function unwrapSafeValue(value: SafeValue): string {
|
||||
export function unwrapSafeValue(value: string | SafeValue): string {
|
||||
return value instanceof SafeValueImpl ?
|
||||
(value as SafeValueImpl).changingThisBreaksApplicationSecurity :
|
||||
'';
|
||||
(value as string);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user