diff options
| author | Igor Minar | 2011-08-14 03:24:09 -0700 |
|---|---|---|
| committer | Igor Minar | 2011-08-19 00:59:44 -0700 |
| commit | 4c8eaa1eb05ba98d30ff83f4420d6fcd69045d99 (patch) | |
| tree | dc2cf6febf4af2dc081e81355451fc728c792e69 /src/directives.js | |
| parent | 4ba35eb97e8b7b9cf255e556fa0b86c892e76b1b (diff) | |
| download | angular.js-4c8eaa1eb05ba98d30ff83f4420d6fcd69045d99.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.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/directives.js b/src/directives.js index 64a06359..70398c81 100644 --- a/src/directives.js +++ b/src/directives.js @@ -738,7 +738,7 @@ angularDirective("ng:class-even", ngClass(function(i){return i % 2 === 1;})); angularDirective("ng:show", function(expression, element){ return function(element){ this.$onEval(function(){ - toBoolean(this.$eval(expression)) ? element.show() : element.hide(); + element.css('display', toBoolean(this.$eval(expression)) ? '' : 'none'); }, element); }; }); @@ -779,7 +779,7 @@ angularDirective("ng:show", function(expression, element){ angularDirective("ng:hide", function(expression, element){ return function(element){ this.$onEval(function(){ - toBoolean(this.$eval(expression)) ? element.hide() : element.show(); + element.css('display', toBoolean(this.$eval(expression)) ? 'none' : ''); }, element); }; }); |
