fix(ivy): incorrectly remapping certain properties that refer inputs (#28765)
During build time we remap particular property bindings, because their names don't match their attribute equivalents (e.g. the property for the `for` attribute is called `htmlFor`). This breaks down if the particular element has an input that has the same name, because the property gets mapped to something invalid. The following changes address the issue by mapping the name during runtime, because that's when directives are resolved and we know all of the inputs that are associated with a particular element. PR Close #28765
This commit is contained in:

committed by
Igor Minar

parent
9defc00b14
commit
93a7836f7a
@ -176,10 +176,10 @@ describe('R3 template transform', () => {
|
||||
]);
|
||||
});
|
||||
|
||||
it('should normalize property names via the element schema', () => {
|
||||
it('should not normalize property names via the element schema', () => {
|
||||
expectFromHtml('<div [mappedAttr]="v"></div>').toEqual([
|
||||
['Element', 'div'],
|
||||
['BoundAttribute', BindingType.Property, 'mappedProp', 'v'],
|
||||
['BoundAttribute', BindingType.Property, 'mappedAttr', 'v'],
|
||||
]);
|
||||
});
|
||||
|
||||
@ -499,4 +499,4 @@ describe('R3 template transform', () => {
|
||||
]);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user