Skip to content

fix(compiler): handle nested brackets in host object bindings#68044

Open
crisbeto wants to merge 1 commit intoangular:mainfrom
crisbeto:68039/host-bindings-parsing
Open

fix(compiler): handle nested brackets in host object bindings#68044
crisbeto wants to merge 1 commit intoangular:mainfrom
crisbeto:68039/host-bindings-parsing

Conversation

@crisbeto
Copy link
Copy Markdown
Member

@crisbeto crisbeto commented Apr 6, 2026

Fixes that we were parsing bindings in the host object with a regex that didn't account for nested brackets which may come up with something like Tailwind.

Fixes #68039.

Fixes that we were parsing bindings in the `host` object with a regex that didn't account for nested brackets which may come up with something like Tailwind.

Fixes angular#68039.
@crisbeto crisbeto added action: review The PR is still awaiting reviews from at least one requested reviewer target: patch This PR is targeted for the next patch release labels Apr 6, 2026
@angular-robot angular-robot bot added the area: compiler Issues related to `ngc`, Angular's template compiler label Apr 6, 2026
@ngbot ngbot bot added this to the Backlog milestone Apr 6, 2026
hostBindings: function MyComponent_HostBindings(rf, ctx) {
if (rf & 2) {
$r3$.ɵɵclassProp("text-primary/80", ctx.expr)("data-active:text-green-300/80", ctx.expr)("data-[size='large'", ctx.expr);
$r3$.ɵɵclassProp("text-primary/80", ctx.expr)("data-active:text-green-300/80", ctx.expr)("data-[size='large']:p-8", ctx.expr);
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fun part is that I captured this in a test back in #62742, but didn't address it 😅

@crisbeto
Copy link
Copy Markdown
Member Author

crisbeto commented Apr 6, 2026

Passing TGP

@crisbeto crisbeto added state: blocked and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Apr 6, 2026
@crisbeto
Copy link
Copy Markdown
Member Author

crisbeto commented Apr 6, 2026

This is blocked until we can clean up a couple of internal clients.

@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note and removed state: blocked labels Apr 6, 2026
@crisbeto
Copy link
Copy Markdown
Member Author

crisbeto commented Apr 6, 2026

Caretaker note: presubmit failure is unrelated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: compiler Issues related to `ngc`, Angular's template compiler merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CSS class binding with the @Component decorator host propery doesn't render correctly

2 participants