aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMisko Hevery2010-08-05 14:01:46 -0700
committerMisko Hevery2010-08-05 14:01:46 -0700
commit49e08f5d2c328d095b5a53413474307001240ac8 (patch)
tree6ccba0b37000e6ce90499ffbd44de903f72237c6
parent89245f3a527415a80d46b37054b558454c314532 (diff)
downloadangular.js-49e08f5d2c328d095b5a53413474307001240ac8.tar.bz2
compile should take existingScope
-rw-r--r--src/Angular.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Angular.js b/src/Angular.js
index 42e2ce89..e11a0679 100644
--- a/src/Angular.js
+++ b/src/Angular.js
@@ -338,12 +338,11 @@ function merge(src, dst) {
}
}
-function compile(element, parentScope) {
+function compile(element, existingScope) {
var compiler = new Compiler(angularTextMarkup, angularAttrMarkup, angularDirective, angularWidget),
- $element = jqLite(element),
- parent = extend({}, parentScope);
+ $element = jqLite(element);
parent.$element = $element;
- return compiler.compile($element)($element, parent);
+ return compiler.compile($element)($element, existingScope);
}
/////////////////////////////////////////////////