mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-28 04:00:23 +00:00
compile should take existingScope
This commit is contained in:
parent
89245f3a52
commit
49e08f5d2c
1 changed files with 3 additions and 4 deletions
|
|
@ -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);
|
||||
}
|
||||
/////////////////////////////////////////////////
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue