diff options
| author | Misko Hevery | 2010-07-02 17:26:26 -0700 |
|---|---|---|
| committer | Misko Hevery | 2010-07-02 17:26:26 -0700 |
| commit | b5195b8f67b143d6c38de9ae2295cb364fab0d95 (patch) | |
| tree | 7358a40f6b958ec237e9177978181cf72db49c6c | |
| parent | 1f0562150921ea2f05149b64ef0440937491def9 (diff) | |
| download | angular.js-b5195b8f67b143d6c38de9ae2295cb364fab0d95.tar.bz2 | |
changed the eval for ie to be able to return a function
| -rw-r--r-- | src/Scope.js | 4 | ||||
| -rw-r--r-- | test/testabilityPatch.js | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/Scope.js b/src/Scope.js index e9b61ec4..b45efbce 100644 --- a/src/Scope.js +++ b/src/Scope.js @@ -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; } diff --git a/test/testabilityPatch.js b/test/testabilityPatch.js index 3020dfba..b71943f6 100644 --- a/test/testabilityPatch.js +++ b/test/testabilityPatch.js @@ -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 + '"'); } } |
