query
function
deprecatedsince v20.2
Finds one or more inner elements within the current element that is
being animated within a sequence. Use with animate().
Deprecation warning
API
function query(
selector: string,
animation: AnimationMetadata | AnimationMetadata[],
options?: AnimationQueryOptions | null,
): AnimationQueryMetadata;query
Finds one or more inner elements within the current element that is
being animated within a sequence. Use with animate().
@paramselector
stringThe element to query, or a set of elements that contain Angular-specific characteristics, specified with one or more of the following tokens.
query(":enter")orquery(":leave"): Query for newly inserted/removed elements (not all elements can be queried via these tokens, see Entering and Leaving Elements)query(":animating"): Query all currently animating elements.query("@triggerName"): Query elements that contain an animation trigger.query("@*"): Query all elements that contain an animation triggers.query(":self"): Include the current element into the animation sequence.
@paramanimation
AnimationMetadata | AnimationMetadata[]One or more animation steps to apply to the queried element or elements. An array is treated as an animation sequence.
@paramoptions
AnimationQueryOptions | nullAn options object. Use the 'limit' field to limit the total number of items to collect.
@returns
AnimationQueryMetadataUsage Notes
Multiple Tokens
Tokens can be merged into a combined query selector string. For example:
query(':self, .record:enter, .record:leave,
Jump to details