fix(ngClass): do not deconstruct classes on element removal (#10303)

Prior to this fix [ngClass] would remove all dynamic classes
when destroyed. It's essential that classes are persisted such
that remove-based animations will still be stylistically correct.
This patch fixes this issue.

Closes #10008
Closes #10303
This commit is contained in:
Matias Niemelä
2016-07-26 15:20:27 -07:00
committed by GitHub
parent 62e7c0f464
commit ba88db5141
3 changed files with 36 additions and 6 deletions

View File

@ -291,14 +291,13 @@ export declare const NG_VALIDATORS: OpaqueToken;
export declare const NG_VALUE_ACCESSOR: OpaqueToken;
/** @stable */
export declare class NgClass implements DoCheck, OnDestroy {
export declare class NgClass implements DoCheck {
initialClasses: string;
ngClass: string | string[] | Set<string> | {
[key: string]: any;
};
constructor(_iterableDiffers: IterableDiffers, _keyValueDiffers: KeyValueDiffers, _ngEl: ElementRef, _renderer: Renderer);
ngDoCheck(): void;
ngOnDestroy(): void;
}
/** @experimental */