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

feat(transition): deprecate $transition service #3497

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/transition/transition.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
angular.module('ui.bootstrap.transition', [])

.value('$transitionSuppressDeprecated', false)
/**
* $transition service provides a consistent interface to trigger CSS 3 transitions and to be informed when they complete.
* @param {DOMElement} element The DOMElement that will be animated.
Expand All @@ -9,7 +10,13 @@ angular.module('ui.bootstrap.transition', [])
* - As a function, it represents a function to be called that will cause the transition to occur.
* @return {Promise} A promise that is resolved when the transition finishes.
*/
.factory('$transition', ['$q', '$timeout', '$rootScope', function($q, $timeout, $rootScope) {
.factory('$transition', [
'$q', '$timeout', '$rootScope', '$log', '$transitionSuppressDeprecated',
function($q , $timeout , $rootScope , $log , $transitionSuppressDeprecated) {

if (!$transitionSuppressDeprecated) {
$log.warn('$transition is now deprecated. Use $animate from ngAnimate instead.');
}

var $transition = function(element, trigger, options) {
options = options || {};
Expand Down