Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- app.directive('testSort', () => ({
- scope: true,
- link: (scope) => {
- scope.items = [
- {ranking: {nature: 1, computers: 2}},
- {ranking: {nature: 2, computers: 1}},
- {ranking: {nature: 3}},
- ]
- }
- }))
- /*
- <test-sort>
- <div ng-repeat="item in items | orderBy:'-ranking.nature'">
- <pre>{{item | json}}</pre>
- </div>
- </test-sort>
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement