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

Commit 9d365b9

Browse files
committed
feat(transition): deprecate transition module
1 parent d024dd7 commit 9d365b9

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Diff for: src/transition/transition.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
angular.module('ui.bootstrap.transition', [])
22

3+
.value('$transitionSuppressDeprecated', false)
34
/**
45
* $transition service provides a consistent interface to trigger CSS 3 transitions and to be informed when they complete.
56
* @param {DOMElement} element The DOMElement that will be animated.
@@ -9,7 +10,13 @@ angular.module('ui.bootstrap.transition', [])
910
* - As a function, it represents a function to be called that will cause the transition to occur.
1011
* @return {Promise} A promise that is resolved when the transition finishes.
1112
*/
12-
.factory('$transition', ['$q', '$timeout', '$rootScope', function($q, $timeout, $rootScope) {
13+
.factory('$transition', [
14+
'$q', '$timeout', '$rootScope', '$log', '$transitionSuppressDeprecated',
15+
function($q , $timeout , $rootScope , $log , $transitionSuppressDeprecated) {
16+
17+
if (!$transitionSuppressDeprecated) {
18+
$log.warn('$transition is now deprecated. Use $animate from ngAnimate instead.');
19+
}
1320

1421
var $transition = function(element, trigger, options) {
1522
options = options || {};

0 commit comments

Comments
 (0)