Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

angular-order-object-by

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-order-object-by

An Angular filter to order an object of objects by a given attribute on the children objects

  • 1.3.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
92
decreased by-29.23%
Maintainers
1
Weekly downloads
 
Created
Source

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! :wink:

Keywords

FAQs

Package last updated on 19 Mar 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc