diff options
Diffstat (limited to 'src/apis.js')
| -rw-r--r-- | src/apis.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/apis.js b/src/apis.js index 5864ad60..306d0ce8 100644 --- a/src/apis.js +++ b/src/apis.js @@ -178,7 +178,7 @@ var angularArray = { descending = $.charAt(0) == '-'; $ = $.substring(1); } - var get = $ ? angular['Function']['compile']($) : identity; + var get = $ ? expressionCompile($).fnSelf : identity; return reverse(function(a,b){ return compare(get(a),get(b)); }, descending); @@ -190,7 +190,9 @@ var angularArray = { } return 0; }; - return copy(array).sort(reverse(comparator, descend)); + var arrayCopy = []; + for ( var i = 0; i < array.length; i++) { arrayCopy.push(array[i]); } + return arrayCopy.sort(reverse(comparator, descend)); }, 'orderByToggle':function(predicate, attribute) { var STRIP = /^([+|-])?(.*)/; @@ -296,9 +298,7 @@ var angularFunction = { if (isFunction(expression)){ return expression; } else if (expression){ - return function($) { - return createScope($).$eval(expression); - }; + return expressionCompile(expression).fnSelf; } else { return identity; } |
