state()

state

Experimental Function

Class Export

export state(stateNameExpr: string, styles: AnimationStyleMetadata) : AnimationStateDeclarationMetadata

state is an animation-specific function that is designed to be used inside of Angular2's animation DSL language. If this information is new, please navigate to the component animations metadata page to gain a better understanding of how animations in Angular2 are used.

state declares an animation state within the given trigger. When a state is active within a component then its associated styles will persist on the element that the trigger is attached