aboutsummaryrefslogtreecommitdiffstats
path: root/src/ng/directive
diff options
context:
space:
mode:
authorMatias Niemelä2013-07-23 23:02:15 -0400
committerMisko Hevery2013-07-26 23:49:54 -0700
commit8ed0d5b6aa2e29ebc8d2026cb04380ed3343baef (patch)
tree2c14004d495badc36f6336a322160e9ec2c3cf5b /src/ng/directive
parent81923f1e41560327f7de6e8fddfda0d2612658f3 (diff)
downloadangular.js-8ed0d5b6aa2e29ebc8d2026cb04380ed3343baef.tar.bz2
chore($animate): replace show/hide with addClass/removeClass
Diffstat (limited to 'src/ng/directive')
-rw-r--r--src/ng/directive/ngShowHide.js4
1 files changed, 2 insertions, 2 deletions
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');
});
};
}];