Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

orderBy: some string values break ordering (e.g. minus, plus, slash, ...) #11435

@m99coder

Description

@m99coder

Hi guys,

using built-in orderBy filter with some not so common string values representing keys in objects breaks ordering and also has different default sort order.

Basically a construct like the following doesn’t work currently by toggling sort order. It remains sorted descending always.

<li data-ng-repeat="item in items | orderBy:'key-with-dashes':sortOrder">{{ item | json }}</li>
<a data-ng-click="sortOrder = !sortOrder">toggle sort order</a>

Additionally using key/with/slashes results in being sorted ascending always.

JSFiddle: http://jsfiddle.net/m99coder/82fj4vcs/3/

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions