Skip to content

Commit 563be7e

Browse files
committed
refactor(ngBind): name link and compile functions
For easier debugging.
1 parent e0489ab commit 563be7e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/ng/directive/ngBind.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@
5454
var ngBindDirective = ['$compile', function($compile) {
5555
return {
5656
restrict: 'AC',
57-
compile: function(templateElement) {
57+
compile: function ngBindCompile(templateElement) {
5858
$compile.$$addBindingClass(templateElement);
59-
return function (scope, element, attr) {
59+
return function ngBindLink(scope, element, attr) {
6060
$compile.$$addBindingInfo(element, attr.ngBind);
6161
scope.$watch(attr.ngBind, function ngBindWatchAction(value) {
6262
// We are purposefully using == here rather than === because we want to
@@ -123,17 +123,17 @@ var ngBindDirective = ['$compile', function($compile) {
123123
*/
124124
var ngBindTemplateDirective = ['$interpolate', '$compile', function($interpolate, $compile) {
125125
return {
126-
compile: function(templateElement) {
126+
compile: function ngBindTemplateCompile(templateElement) {
127127
$compile.$$addBindingClass(templateElement);
128-
return function(scope, element, attr) {
128+
return function ngBindTemplateLink(scope, element, attr) {
129129
var interpolateFn = $interpolate(element.attr(attr.$attr.ngBindTemplate));
130130
$compile.$$addBindingInfo(element, interpolateFn.expressions);
131131
attr.$observe('ngBindTemplate', function(value) {
132132
element.text(value);
133133
});
134134
};
135135
}
136-
}
136+
};
137137
}];
138138

139139

@@ -185,10 +185,10 @@ var ngBindTemplateDirective = ['$interpolate', '$compile', function($interpolate
185185
var ngBindHtmlDirective = ['$sce', '$parse', '$compile', function($sce, $parse, $compile) {
186186
return {
187187
restrict: 'A',
188-
compile: function (tElement, tAttrs) {
188+
compile: function ngBindHtmlCompile(tElement, tAttrs) {
189189
$compile.$$addBindingClass(tElement);
190190

191-
return function (scope, element, attr) {
191+
return function ngBindHtmlLink(scope, element, attr) {
192192
$compile.$$addBindingInfo(element, attr.ngBindHtml);
193193
var ngBindHtmlGetter = $parse(attr.ngBindHtml);
194194
var ngBindHtmlWatch = $parse(attr.ngBindHtml, function getStringValue(value) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy