-
Notifications
You must be signed in to change notification settings - Fork 27.4k
orderBy filter doesn't support sorting by the value itself #4579
Comments
Here is a plnkr reproducing it: http://plnkr.co/edit/ivpyUNZvaC6SlJAbrkzH?p=preview It looks like |
Yeah I don't think that If that would be considered as breaking backwards compatibility (though I imagine no one actually uses it this way as it does nothing), an |
But couldn't you conceivably create a conflict if someone has a key named Is this workaround no good for a particular reason? http://plnkr.co/edit/OAm1GTNRV9tkRMcJJe9E?p=preview |
It's possible, though unlikely. Of course there are workarounds - the simplest one being passing I'd say |
@wesleycho's plunk doesn't work because |
wouldn't it make sense to change orderBy to consider no parameter as predicate that is an identity function? so you would do this in the template:
such change should be trivial |
unless I'm missing something, I say: "PR PLZ!" |
+1 |
For example, it's impossible to sort an array of strings without creating an identity function
Happy to make the mod and send a PR if you will merge it.
The text was updated successfully, but these errors were encountered: