Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

feat(carousel): Callbacks when carousel transitions begin and end. #2067

Closed
wants to merge 1 commit into from

Conversation

chippage0
Copy link

This commit adds callbacks for the begin and end of the transition animations.
When a transition starts, the begin callbacks are invoked (for entering or leaving slides).
When the transitioning ends, the end callbacks are invoked (for entering or leaving slides).

This introduces the following attributes on the slide directive:

  • onenteringtransitionbegin
  • onenteringtransitionend
  • onleavingtransitionbegin
  • onleavingtransitionend

These will cause the corresponding callback expression to be evaluated (within the scope).

Example:

<slide ... onenteringtransitionbegin="enteringEnded()" ...>

Where the scope has the following function:

$scope.enteringEnded = function enteringEnded() { ... };

This commit adds callbacks for the begin and end of the transition animations.
When a transition starts, the begin callbacks are invoked (entering or leaving versions).
When the transitioning ends, the end callbacks are invoked (entering or leaving versions).

This introduces the following attributes on the slide directive:
	onenteringtransitionbegin
	onenteringtransitionend
	onleavingtransitionbegin
	onleavingtransitionend

These will cause a callback to be before (within the scope).

Example:

<slide ... onenteringtransitionbegin="enteringEnded()" ...>
Where the scope has the following function:  $scope.enteringEnded = function enteringEnded() { ... };
@chrisirhc
Copy link
Contributor

After #2699 is merged, you can use the $animate:* events (e.g.$animate:after, $animate:close) to find out when the transition has started or ended.

chrisirhc added a commit to chrisirhc/angular-ui-bootstrap that referenced this pull request Sep 15, 2014
chrisirhc added a commit to chrisirhc/angular-ui-bootstrap that referenced this pull request Sep 15, 2014
chrisirhc added a commit to chrisirhc/angular-ui-bootstrap that referenced this pull request Mar 16, 2015
chrisirhc added a commit to chrisirhc/angular-ui-bootstrap that referenced this pull request Mar 17, 2015
@chrisirhc chrisirhc closed this in 431b9c7 Mar 19, 2015
@karianna karianna added this to the 0.13.0 milestone Mar 19, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants