Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upQuery redesign #3922
Closed
Query redesign #3922
Comments
|
The only thing that is left is to remove the old API. |
Open
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This is a proposal for a redesign for the query API. It allows a directive to find other directives that are structurally its 'children'.
@ContentChild/@ContentChildren(used to be @query) and its view with@ViewChild/@ViewChildren(used to be @ViewQuery).Ex:
The children directives will be set before the following callbacks are fired (#3863) -
afterContentCheckedforContentChildandafterViewCheckedforViewChild.Both query mechanisms do not go into further into component subviews.
ContentChild / ContentChildrensupport configurable visibility as follows :descendants: true- all content descendants are considereddescendants: false- only direct children of the querying directive are considered (default)ViewChildrenhas no visibility configuration. Queries always skip the element on which the querying directive lives (similar toDOM.querySelector).Implementation
ContentChildrenandViewChildren(#4237)// cc @mhevery @vsavkin