aboutsummaryrefslogtreecommitdiffstats
path: root/src/Compiler.js
diff options
context:
space:
mode:
authorMisko Hevery2011-02-10 11:20:49 -0800
committerMisko Hevery2011-02-16 08:59:42 -0500
commit00cc9eb32a9387040d0175fcfd21cf9dcab6514f (patch)
tree0edaac339a3ec69ff769e20b28b6ebe51d040272 /src/Compiler.js
parentef4bb28be13e99f96c9ace5936cf26a174a0e5f0 (diff)
downloadangular.js-00cc9eb32a9387040d0175fcfd21cf9dcab6514f.tar.bz2
rewrite of JQuery lite implementation, which now better supports selected sets
Diffstat (limited to 'src/Compiler.js')
-rw-r--r--src/Compiler.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Compiler.js b/src/Compiler.js
index 890f2510..77c83846 100644
--- a/src/Compiler.js
+++ b/src/Compiler.js
@@ -26,7 +26,6 @@ Template.prototype = {
if (!queue) {
inits[this.priority] = queue = [];
}
- element = jqLite(element);
if (this.newScope) {
childScope = createScope(scope);
scope.$onEval(childScope.$eval);
@@ -45,7 +44,7 @@ Template.prototype = {
paths = this.paths,
length = paths.length;
for (i = 0; i < length; i++) {
- children[i].collectInits(childNodes[paths[i]], inits, childScope);
+ children[i].collectInits(jqLite(childNodes[paths[i]]), inits, childScope);
}
},
@@ -98,7 +97,7 @@ Compiler.prototype = {
scope = scope || createScope();
element = element === true
? templateElement.cloneNode()
- : (jqLite(element) || templateElement);
+ : (element ? jqLite(element) : templateElement);
element.data($$scope, scope);
template.attach(element, scope);
scope.$element = element;