mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-04-15 12:21:05 +00:00
fix argument variables in compiler
This commit is contained in:
parent
2c0f7ffe3a
commit
964e394555
1 changed files with 5 additions and 5 deletions
|
|
@ -92,20 +92,20 @@ function Compiler(markup, attrMarkup, directives, widgets){
|
|||
}
|
||||
|
||||
Compiler.prototype = {
|
||||
compile: function(rawElement) {
|
||||
rawElement = jqLite(rawElement);
|
||||
compile: function(element) {
|
||||
element = jqLite(element);
|
||||
var index = 0,
|
||||
template,
|
||||
parent = rawElement.parent();
|
||||
parent = element.parent();
|
||||
if (parent && parent[0]) {
|
||||
parent = parent[0];
|
||||
for(var i = 0; i < parent.childNodes.length; i++) {
|
||||
if (parent.childNodes[i] == rawElement[0]) {
|
||||
if (parent.childNodes[i] == element[0]) {
|
||||
index = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
template = this.templatize(rawElement, index, 0) || new Template();
|
||||
template = this.templatize(element, index, 0) || new Template();
|
||||
return function(element, parentScope){
|
||||
element = jqLite(element);
|
||||
var scope = parentScope && parentScope.$eval ?
|
||||
|
|
|
|||
Loading…
Reference in a new issue