Skip to content

Instantly share code, notes, and snippets.

@freidamachoi
Created August 15, 2013 05:16
Show Gist options
  • Save freidamachoi/6238432 to your computer and use it in GitHub Desktop.
Save freidamachoi/6238432 to your computer and use it in GitHub Desktop.
AngularJs - sort numeric
$scope.mySortFunction = function(item) {
if(isNaN(item[$scope.sortExpression]))
return item[$scope.sortExpression];
return parseInt(item[$scope.sortExpression]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment