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

Commit 2218e6f

Browse files
committedAug 28, 2014
refactor($compile): rename element -> $element
To follow our convention (at least in this file): if it’s a jqLite/jQuery wrapper than the variable name starts with `$`.
1 parent cec9ecf commit 2218e6f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed
 

‎src/ng/compile.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -906,23 +906,23 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
906906
},
907907
NG_ATTR_BINDING = /^ngAttr[A-Z]/;
908908

909-
compile.$$addBindingInfo = debugInfoEnabled ? function $$addBindingInfo(element, binding) {
910-
var bindings = element.data('$binding') || [];
909+
compile.$$addBindingInfo = debugInfoEnabled ? function $$addBindingInfo($element, binding) {
910+
var bindings = $element.data('$binding') || [];
911911

912912
if (isArray(binding)) {
913913
bindings = bindings.concat(binding);
914914
} else {
915915
bindings.push(binding);
916916
}
917917

918-
safeAddClass(element, 'ng-binding');
919-
element.data('$binding', bindings);
918+
safeAddClass($element, 'ng-binding');
919+
$element.data('$binding', bindings);
920920
} : noop;
921921

922-
compile.$$addScopeInfo = debugInfoEnabled ? function $$addScopeInfo(element, scope, isolated, noTemplate) {
923-
safeAddClass(element, isolated ? 'ng-isolate-scope' : 'ng-scope');
922+
compile.$$addScopeInfo = debugInfoEnabled ? function $$addScopeInfo($element, scope, isolated, noTemplate) {
923+
safeAddClass($element, isolated ? 'ng-isolate-scope' : 'ng-scope');
924924
var dataName = isolated ? (noTemplate ? '$isolateScopeNoTemplate' : '$isolateScope') : '$scope';
925-
element.data(dataName, scope);
925+
$element.data(dataName, scope);
926926
} : noop;
927927

928928
return compile;

0 commit comments

Comments
 (0)
This repository has been archived.