You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Convert [ngClass]="{x: ...}" to [class.x]="..." during prod build #45734
Is it possible during production build to convert [ngClass] to [class.] and then bundle the code?
As result, we will have a smaller bundle and seems a bit faster application.
Alternatives considered
None.
Reacted by C /, Samuel Fernández, Nigro Simone, Vitaliy Dybov, IvanBisultanov, Evgeny Alisyonok, Maksim Baranov, Sergey Truhtanov, francesco, VictorSholomickiy and 12 more
changed the title [-]Convert [ngClass]="..." to [class.x]="..." during prod build[/-][+]Convert [ngClass]="{x: ...}" to [class.x]="..." during prod build[/+]on Apr 26, 2022
This feature request is now candidate for our backlog! In the next phase, the community has 60 days to upvote. If the request receives more than 20 upvotes, we'll move it to our consideration list.
You can find more details about the feature request process in our documentation.
Activity
[-]Convert [ngClass]="..." to [class.x]="..." during prod build[/-][+]Convert [ngClass]="{x: ...}" to [class.x]="..." during prod build[/+]angular-robot commentedon May 17, 2022
This feature request is now candidate for our backlog! In the next phase, the community has 60 days to upvote. If the request receives more than 20 upvotes, we'll move it to our consideration list.
You can find more details about the feature request process in our documentation.
angular-robot commentedon Jun 26, 2022
Just a heads up that we kicked off a community voting process for your feature request. There are 20 days until the voting process ends.
Find more details about Angular's feature request process in our documentation.
alxhub commentedon Aug 11, 2022
This seems like a good candidate for an extended diagnostic instead -
[ngClass]with a literal could be converted to individual class bindings.1 remaining item
JeanMeche commentedon Aug 31, 2025
We added a new migration with #62983, it'll be available in v21 this fall.
angular-automatic-lock-bot commentedon Oct 1, 2025
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.