diff options
Diffstat (limited to 'src/ng/directive/ngBind.js')
| -rw-r--r-- | src/ng/directive/ngBind.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ng/directive/ngBind.js b/src/ng/directive/ngBind.js index c55ab076..82ff505a 100644 --- a/src/ng/directive/ngBind.js +++ b/src/ng/directive/ngBind.js @@ -50,6 +50,9 @@ var ngBindDirective = ngDirective(function(scope, element, attr) { element.addClass('ng-binding').data('$binding', attr.ngBind); scope.$watch(attr.ngBind, function ngBindWatchAction(value) { + // We are purposefully using == here rather than === because we want to + // catch when value is "null or undefined" + // jshint -W041 element.text(value == undefined ? '' : value); }); }); @@ -111,7 +114,7 @@ var ngBindTemplateDirective = ['$interpolate', function($interpolate) { attr.$observe('ngBindTemplate', function(value) { element.text(value); }); - } + }; }]; |
