Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 0a738ce

Browse files
committed
perf(ngBind): bypass jquery/jqlite when setting text
1 parent d208ba2 commit 0a738ce

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/ng/directive/ngBind.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,13 @@ var ngBindDirective = ngDirective({
5757

5858
return function ngBindLink(scope, element, attr) {
5959
element.data('$binding', attr.ngBind);
60+
element = element[0];
61+
6062
scope.$watch(attr.ngBind, function ngBindWatchAction(value) {
6163
// We are purposefully using == here rather than === because we want to
6264
// catch when value is "null or undefined"
6365
// jshint -W041
64-
element.text(value == undefined ? '' : value);
66+
element.textContent = (value == undefined ? '' : value);
6567
});
6668
};
6769
}

0 commit comments

Comments
 (0)