Skip to content

Conversation

matsko
Copy link
Contributor

@matsko matsko commented Jul 26, 2016

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

@matsko
Copy link
Contributor Author

matsko commented Jul 26, 2016

@pkozlowski-opensource @mhevery please review.

@@ -129,8 +129,6 @@ export class NgClass implements DoCheck, OnDestroy {
}
}

ngOnDestroy(): void { this._cleanupClasses(this._rawClass); }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to also remove OnDestroy and a relevant import

@mhevery
Copy link
Contributor

mhevery commented Jul 26, 2016

Lgtm.

This is safe to remove. It was there when we did view caching and it is no longer applicable. Safe to remove.

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 angular#10008
Closes angular#10303
@matsko matsko merged commit ba88db5 into angular:master Jul 26, 2016
@matsko matsko deleted the fix_ng_class branch July 26, 2016 22:20
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Animation: ngClass not working on exit (* => void) transition
4 participants