Spec-Zone.ru › Angular

query

Finds one or more inner elements within the current element that is being animated within a sequence. Use with animate().

Deprecation warning

Use animate.enter or animate.leave instead. Intent to remove in v23

API

function query(
  selector: string,
  animation: AnimationMetadata | AnimationMetadata[],
  options?: AnimationQueryOptions | null,
): AnimationQueryMetadata;
@deprecated

Use animate.enter or animate.leave instead. Intent to remove in v23

@paramselectorstring

The element to query, or a set of elements that contain Angular-specific characteristics, specified with one or more of the following tokens.

  • query(":enter") or query(":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.
@paramanimationAnimationMetadata | AnimationMetadata[]

One or more animation steps to apply to the queried element or elements. An array is treated as an animation sequence.

@paramoptionsAnimationQueryOptions | null

An options object. Use the 'limit' field to limit the total number of items to collect.

@returnsAnimationQueryMetadata

Usage Notes

Multiple Tokens

Tokens can be merged into a combined query selector string. For example:

 query(':self, .record:enter, .record:leave,

Super-powered by Google ©2010–2025.
Code licensed under an MIT-style License. Documentation licensed under CC BY 4.0.
https://angular.dev/api/animations/query

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API