aboutsummaryrefslogtreecommitdiffstats
path: root/src/ng
diff options
context:
space:
mode:
Diffstat (limited to 'src/ng')
-rw-r--r--src/ng/animate.js10
-rw-r--r--src/ng/directive/ngShowHide.js4
2 files changed, 2 insertions, 12 deletions
diff --git a/src/ng/animate.js b/src/ng/animate.js
index 7e515594..206a4b03 100644
--- a/src/ng/animate.js
+++ b/src/ng/animate.js
@@ -80,16 +80,6 @@ var $AnimateProvider = ['$provide', function($provide) {
this.enter(element, parent, after, done);
},
- show : function(element, done) {
- element.removeClass('ng-hide');
- (done || noop)();
- },
-
- hide : function(element, done) {
- element.addClass('ng-hide');
- (done || noop)();
- },
-
addClass : function(element, className, done) {
className = isString(className) ?
className :
diff --git a/src/ng/directive/ngShowHide.js b/src/ng/directive/ngShowHide.js
index bdbcf463..1bba11ef 100644
--- a/src/ng/directive/ngShowHide.js
+++ b/src/ng/directive/ngShowHide.js
@@ -100,7 +100,7 @@
var ngShowDirective = ['$animate', function($animate) {
return function(scope, element, attr) {
scope.$watch(attr.ngShow, function ngShowWatchAction(value){
- $animate[toBoolean(value) ? 'show' : 'hide'](element);
+ $animate[toBoolean(value) ? 'removeClass' : 'addClass'](element, 'ng-hide');
});
};
}];
@@ -204,7 +204,7 @@ var ngShowDirective = ['$animate', function($animate) {
var ngHideDirective = ['$animate', function($animate) {
return function(scope, element, attr) {
scope.$watch(attr.ngHide, function ngHideWatchAction(value){
- $animate[toBoolean(value) ? 'hide' : 'show'](element);
+ $animate[toBoolean(value) ? 'addClass' : 'removeClass'](element, 'ng-hide');
});
};
}];