Skip to content

Better docs for ViewChild and ContentChild selectors #21734

@diminutivesloop

Description

@diminutivesloop

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Feature request
[x] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

The documentation for the ViewChild, and ContentChild decorators does not make clear what qualifies as a valid selector for specifying a target element or directive. Even if one can infer from the various code examples that Component classes, Directive classes, and standard CSS selectors are valid options I see no documentation that indicates template reference variables may be used as selectors. This has apparently already confused at least one other person.

Metadata

Metadata

Assignees

Labels

featureLabel used to distinguish feature request from other issuesfreq3: highstate: communitySomeone from the Angular community is working on this issue or submitted this PRstate: has PR

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions