Skip to content

elad/angular-orderByLocaleAware

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

orderByLocaleAware

This is a copy of Angular's orderBy filter with locale-aware bits added.

What is locale-aware ordering? It means that locale is taken into account when ordering. For example, in the he-IL locale, Hebrew strings take priority to English strings.

Install

bower install angular-orderByLocaleAware

Use

Include it in your project, add a dependency, and then same as you would orderBy. Mark localized properties with the @ prefix:

<div ng-repeat="item in items | orderByLocaleAware:'+@name'">
  ...
</div>

Setting the locale is done through orderByLocaleAwareConfig:

angular.module('myApp', ['orderByLocaleAware'])
.controller('myController', function(orderByLocaleAwareConfig) {
  orderByLocaleAwareConfig.localeId = 'he-IL';
});

About

orderBy with locale awareness for Angular

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors