4.0.0-rc.6 regression: using @Input() @ContentChild() on the same property breaks input #15417
Labels
area: core
Issues related to the framework runtime
regression
Indicates than the issue relates to something that worked in a previous version
type: bug/fix
Milestone
I'm submitting a ... (check one with "x")
Current behavior
Given the property that has both @input() and @ContentChild() annotations breaks the @input(). Ex.:
@Input() @ContentChild(TemplateRef) tpl: TemplateRef<any>;
Expected behavior
Using
@Input()
and@ContentChild()
on the same element should be supported as it used to be in 2.x or clearly documented as not supported.Minimal reproduction of the problem with instructions
http://plnkr.co/edit/2jmrDYD7yEV62YaQ848y?p=preview
Observed behaviour: prints: "default, Custom as a child, default"
Expected behaviour: prints: "default, Custom as a child, Custom as a binding"
What is the motivation / use case for changing the behavior?
In ng-bootstrap we've got the API that let's users provide a custom rating template either as a binding or as a child template: https://github.com/ng-bootstrap/ng-bootstrap/blob/5856a75ace90c7323d073f1a9838560016bbb5d4/src/rating/rating.ts#L96
Besides it is a regression, you can confirm that it used to work by changing ANgular version in the config.js file in the linked plunker.
The text was updated successfully, but these errors were encountered: