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

Commit 49e08f5

Browse files
committed
compile should take existingScope
1 parent 89245f3 commit 49e08f5

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/Angular.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -338,12 +338,11 @@ function merge(src, dst) {
338338
}
339339
}
340340

341-
function compile(element, parentScope) {
341+
function compile(element, existingScope) {
342342
var compiler = new Compiler(angularTextMarkup, angularAttrMarkup, angularDirective, angularWidget),
343-
$element = jqLite(element),
344-
parent = extend({}, parentScope);
343+
$element = jqLite(element);
345344
parent.$element = $element;
346-
return compiler.compile($element)($element, parent);
345+
return compiler.compile($element)($element, existingScope);
347346
}
348347
/////////////////////////////////////////////////
349348

0 commit comments

Comments
 (0)