aboutsummaryrefslogtreecommitdiffstats
path: root/src/directives.js
diff options
context:
space:
mode:
authorIgor Minar2011-08-14 03:24:09 -0700
committerIgor Minar2011-08-15 12:51:41 -0700
commit793ecb48176ad6d8866ce38f4242971c81ceda31 (patch)
tree0f4a6c975bcab004f7878a4765c56c87b3e34c02 /src/directives.js
parent1d45e65f4a026eb0461429f2557a5f0400b7f88e (diff)
downloadangular.js-793ecb48176ad6d8866ce38f4242971c81ceda31.tar.bz2
refactor(jqLite): remove jqLite show/hide support
it turns out that even with our tricks, jqLite#show is not usable in practice and definitely not on par with jQuery. so rather than introducing half-baked apis which introduce issues, I'm removing them. I also removed show/hide uses from docs, since they are not needed. Breaks jqLite.hide/jqLite.show which are no longer available.
Diffstat (limited to 'src/directives.js')
-rw-r--r--src/directives.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/directives.js b/src/directives.js
index 54d7feb2..7edbbd6f 100644
--- a/src/directives.js
+++ b/src/directives.js
@@ -710,7 +710,7 @@ angularDirective("ng:class-even", ngClass(function(i){return i % 2 === 1;}));
angularDirective("ng:show", function(expression, element){
return function(element){
this.$watch(expression, function(scope, value){
- toBoolean(value) ? element.show() : element.hide();
+ element.css('display', toBoolean(value) ? '' : 'none');
});
};
});
@@ -751,7 +751,7 @@ angularDirective("ng:show", function(expression, element){
angularDirective("ng:hide", function(expression, element){
return function(element){
this.$watch(expression, function(scope, value){
- toBoolean(value) ? element.hide() : element.show();
+ element.css('display', toBoolean(value) ? 'none' : '');
});
};
});