angular-order-object-by

WebJar for angular-order-object-by

License

License

MIT
Categories

Categories

Angular User Interface Web Frameworks
GroupId

GroupId

org.webjars.bower
ArtifactId

ArtifactId

angular-order-object-by
Last Version

Last Version

1.3.0
Release Date

Release Date

Type

Type

jar
Description

Description

angular-order-object-by
WebJar for angular-order-object-by
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/fmquaglia/ngOrderObjectBy

Download angular-order-object-by

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.bower/angular-order-object-by/ -->
<dependency>
    <groupId>org.webjars.bower</groupId>
    <artifactId>angular-order-object-by</artifactId>
    <version>1.3.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.bower/angular-order-object-by/
implementation 'org.webjars.bower:angular-order-object-by:1.3.0'
// https://jarcasting.com/artifacts/org.webjars.bower/angular-order-object-by/
implementation ("org.webjars.bower:angular-order-object-by:1.3.0")
'org.webjars.bower:angular-order-object-by:jar:1.3.0'
<dependency org="org.webjars.bower" name="angular-order-object-by" rev="1.3.0">
  <artifact name="angular-order-object-by" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.bower', module='angular-order-object-by', version='1.3.0')
)
libraryDependencies += "org.webjars.bower" % "angular-order-object-by" % "1.3.0"
[org.webjars.bower/angular-order-object-by "1.3.0"]

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.bower : angular jar [1.3.11-1.5,2)

Project Modules

There are no modules declared in this project.

Angular orderObjectBy filter

Synopsis

This filter was created by Justin Klemm because the default Angular orderBy filter fails to sort properly Objects of Objects in the context of ngRepeat.

Use

Install as Bower dependency: bower install angular-order-object-by.

Include on your Angular module's dependencies:

angular.module('YourModule', ['ngOrderObjectBy'])

Then, in your application views:

<ul>
    <li ng-repeat="object in objects | orderObjectBy: 'criteria' : direction">...</li>
</ul>

Thanks to @diegou work now sorting by children's sudocument's properties is supported:

<ul>
    <li ng-repeat="object in objects | orderObjectBy: 'property.criteria' : direction">...</li>
</ul>

For an example see test/index.html.

Tests

You need karma, karma-cli, karma-jasmine, phantomjs, karma-phantom-js-launcher and angular-mocks in order to run the tests.

karma start karma.conf.js

Contributions

Feel free to fork, and submit your pull requests using a feature branch on your fork.

Don't forget to add tests! 😉

Versions

Version
1.3.0
1.1.1