{ "id": "api/animations/AnimationFactory", "title": "AnimationFactory", "contents": "\n\n
\n
\n
\n \n API > @angular/animations\n
\n \n
\n \n
\n

AnimationFactorylink

\n \n \n \n \n \n
\n \n \n\n
\n \n
\n

A factory object returned from the AnimationBuilder.build() method.

\n\n \n
\n \n \n \n
\n\nabstract class AnimationFactory {\n abstract create(element: any, options?: AnimationOptions): AnimationPlayer\n}\n\n\n \n \n\n
\n\n\n \n\n \n \n \n\n\n\n\n\n\n\n\n\n\n\n\n
\n

Methodslink

\n \n \n\n \n \n \n \n \n \n \n \n \n \n\n \n\n \n \n
\n
\n

\n create()\n \n link

\n \n
\n
\n

Creates an AnimationPlayer instance for the reusable animation defined by\nthe AnimationBuilder.build() method that created this factory.\nAttaches the new player a DOM element.

\n\n
\n
\n \n\n abstract create(element: any, options?: AnimationOptions): AnimationPlayer\n\n \n\n
Parameters
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n element\n any\n

The DOM element to which to attach the animation.

\n\n
\n \n options\n AnimationOptions\n

A set of options that can include a time delay and\nadditional developer-defined parameters.

\n

Optional. Default is undefined.

\n\n
\n\n \n
Returns
\n

AnimationPlayer

\n\n \n\n\n \n\n \n
\n
\n\n \n
\n\n\n\n \n\n\n
\n
\n\n\n" }