changed the eval for ie to be able to return a function

This commit is contained in:
Misko Hevery 2010-07-02 17:26:26 -07:00
parent 1f05621509
commit b5195b8f67
2 changed files with 3 additions and 3 deletions

View file

@ -72,8 +72,8 @@ function getterFn(path){
}
});
code += ' return self;\n}';
fn = eval('(' + code + ')');
fn.toString = function(){ return code; };
fn = eval('fn = ' + code);
fn["toString"] = function(){ return code; };
return getterFnCache[path] = fn;
}

View file

@ -81,7 +81,7 @@ function sortedHtml(element) {
attr.name !='style' &&
attr.name.substr(0, 6) != 'jQuery') {
// in IE we need to check for all of these.
if (!/ng:\d+/.exec(attr.name))
if (!/ng-\d+/.exec(attr.name))
attrs.push(' ' + attr.name + '="' + attr.value + '"');
}
}