compile should take existingScope

This commit is contained in:
Misko Hevery 2010-08-05 14:01:46 -07:00
parent 89245f3a52
commit 49e08f5d2c

View file

@ -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);
}
/////////////////////////////////////////////////