function
Declares an animation state within a trigger attached to an element.
state(name: string, styles: AnimationStyleMetadata, options?: { params: { [name: string]: any; }; }): AnimationStateMetadata
name | string | One or more names for the defined state in a comma-separated string. The following reserved state names can be supplied to define a style for specific use cases:
|
styles | AnimationStyleMetadata | A set of CSS styles associated with this state, created using the |
options | object | Parameters that can be passed to the state when it is invoked. 0 or more key-value pairs. Optional. Default is |
AnimationStateMetadata
: An object that encapsulates the new state data.
Use the trigger()
function to register states to an animation trigger. Use the transition()
function to animate between states. When a state is active within a component, its associated styles persist on the element, even when the animation ends.
© 2010–2021 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v11.angular.io/api/animations/state