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

sequencelink

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

Defines a list of animation steps to be run sequentially, one by one.

\n\n \n
\n \n \n \n\n
\n \n\n sequence(steps: AnimationMetadata[], options: AnimationOptions = null): AnimationSequenceMetadata\n\n \n\n
Parameters
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n steps\n AnimationMetadata[]\n

An array of animation step objects.

\n
    \n
  • Steps defined by style() calls apply the styling data immediately.
  • \n
  • Steps defined by animate() calls apply the styling data over time\nas specified by the timing data.
  • \n
\n\nsequence([\n style({ opacity: 0 }),\n animate(\"1s\", style({ opacity: 1 }))\n])\n\n\n
\n \n options\n AnimationOptions\n

An options object containing a delay and\ndeveloper-defined parameters that provide styling defaults and\ncan be overridden on invocation.

\n

Optional. Default is null.

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

AnimationSequenceMetadata: An object that encapsulates the sequence data.

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

Usage noteslink

\n

When you pass an array of steps to a\ntransition() call, the steps run sequentially by default.\nCompare this to the group() call, which runs animation steps in\nparallel.

\n

When a sequence is used within a group() or a transition() call,\nexecution continues to the next instruction only after each of the inner animation\nsteps have completed.

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