$animate.enabled()

enabled([element], [enabled]);

Used to get and set whether animations are enabled or not on the entire application or on an element and its children. This function can be called in four ways:

1
2
3
4
5
6
7
8
9
10
11
12
13
// returns true or false
$animate.enabled();
 
// changes the enabled state for all animations
$animate.enabled(false);
$animate.enabled(true);
 
// returns true or false if animations are enabled for an element
$animate.enabled(element);
 
// changes the enabled state for an element and its children
$animate.enabled(element, true);
$animate.enabled(element, false);

Parameters

Param Type Details
element
(optional)
DOMElement

the element that will be considered for checking/setting the enabled state

enabled
(optional)
boolean

whether or not the animations will be enabled for the element

Returns

boolean

whether or not animations are enabled

doc_AngularJS
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.