aboutsummaryrefslogtreecommitdiffstats
path: root/src/ng/directive/ngBind.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/ng/directive/ngBind.js')
-rw-r--r--src/ng/directive/ngBind.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/ng/directive/ngBind.js b/src/ng/directive/ngBind.js
index 3c4a7d43..4f6d49aa 100644
--- a/src/ng/directive/ngBind.js
+++ b/src/ng/directive/ngBind.js
@@ -73,7 +73,7 @@ var ngBindDirective = ngDirective(function(scope, element, attr) {
var ngBindHtmlUnsafeDirective = ngDirective(function(scope, element, attr) {
element.addClass('ng-binding').data('$binding', attr.ngBindHtmlUnsafe);
scope.$watch(attr.ngBindHtmlUnsafe, function(value) {
- element.html(value == undefined ? '' : value);
+ element.html(value || '');
});
});
@@ -96,9 +96,8 @@ var ngBindHtmlDirective = ['$sanitize', function($sanitize) {
return function(scope, element, attr) {
element.addClass('ng-binding').data('$binding', attr.ngBindHtml);
scope.$watch(attr.ngBindHtml, function(value) {
- if (value = $sanitize(value)) {
- element.html(value);
- }
+ value = $sanitize(value);
+ element.html(value || '');
});
}
}];