animateChild

Executes a queried inner animation element within an animation sequence.

在一个动画序列中执行一个查询到的内部动画元素。

animateChild(options: AnimateChildOptions | null = null): AnimationAnimateChildMetadata

参数

options

An options object that can contain a delay value for the start of the animation, and additional override values for developer-defined parameters.

一个配置对象,它可以包含一个开始动画之前的延迟数,和一些由开发人员的定义的改写参数值。

可选. 默认值是 null.

返回值

AnimationAnimateChildMetadata: An object that encapsulates the child animation data.

一个对象,封装了子动画数据。

使用说明

Each time an animation is triggered in Angular, the parent animation has priority and any child animations are blocked. In order for a child animation to run, the parent animation must query each of the elements containing child animations, and run them using this function.

每当 Angular 触发动画时,总是父动画优先,而子动画被阻塞。 为了执行子动画,父动画必须查询每个包含子动画的元素,并使用该函数运行它们。

Note that this feature designed to be used with query() and it will only work with animations that are assigned using the Angular animation library. CSS keyframes and transitions are not handled by this API.

注意,设计该特性是为了和 query() 一起使用的,所以它只处理使用 Angular 动画库生成的动画。 本 API 不会处理 CSS 关键帧动画和转场动画。