aboutsummaryrefslogtreecommitdiffstats
path: root/src/ng/directive/ngShowHide.js
diff options
context:
space:
mode:
authorShyam Seshadri2012-07-06 15:23:40 +0530
committerMisko Hevery2012-09-06 16:06:25 -0700
commitca30fce28ca13284bfa1c926e810ed75cdcde499 (patch)
treee7e2a41e740312981fab5f1226f8bd1d98b07e62 /src/ng/directive/ngShowHide.js
parentb6e4a71166c7f00f4140fd7ea8f0cd81b4487a3f (diff)
downloadangular.js-ca30fce28ca13284bfa1c926e810ed75cdcde499.tar.bz2
fix(*): name all anonymous watch functions in Angular
This will allow us to see function names in Batarang and debugger. Closes #1119
Diffstat (limited to 'src/ng/directive/ngShowHide.js')
-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 e381c1b7..cba6cc89 100644
--- a/src/ng/directive/ngShowHide.js
+++ b/src/ng/directive/ngShowHide.js
@@ -34,7 +34,7 @@
*/
//TODO(misko): refactor to remove element from the DOM
var ngShowDirective = ngDirective(function(scope, element, attr){
- scope.$watch(attr.ngShow, function(value){
+ scope.$watch(attr.ngShow, function ngShowWatchAction(value){
element.css('display', toBoolean(value) ? '' : 'none');
});
});
@@ -74,7 +74,7 @@ var ngShowDirective = ngDirective(function(scope, element, attr){
*/
//TODO(misko): refactor to remove element from the DOM
var ngHideDirective = ngDirective(function(scope, element, attr){
- scope.$watch(attr.ngHide, function(value){
+ scope.$watch(attr.ngHide, function ngHideWatchAction(value){
element.css('display', toBoolean(value) ? 'none' : '');
});
});