From 8a552443741d1e5b4b29d9da9c7e9990fa37886c Mon Sep 17 00:00:00 2001 From: Chris Chua Date: Sun, 5 Apr 2015 21:15:58 -0700 Subject: [PATCH] feat(transition): deprecate transition module Closes #3497 --- src/transition/transition.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/transition/transition.js b/src/transition/transition.js index 8e08838bdb..490cdf7bee 100644 --- a/src/transition/transition.js +++ b/src/transition/transition.js @@ -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. @@ -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 || {};