NgOrderObjectBy
Angular filter to orderBy objects of objects in ngRepeat loops
Install / Use
/learn @fmquaglia/NgOrderObjectByREADME
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:
Related Skills
node-connect
346.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
107.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
346.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
346.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
