This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27.5k
Exception is thrown when special characters are used in OrderBy filter #6143
Comments
This seems like a bug in the orderBy filter. I think I can fix this pretty easily |
caitp
added a commit
to caitp/angular.js
that referenced
this issue
Feb 6, 2014
The orderBy filter now allows string predicates passed to the orderBy filter to make use property name predicates containing non-ident strings, such as spaces or percent signs, or non-latin characters. Closes angular#6143
Well there's a fix for ya, lets see if it gets R+'d |
caitp
added a commit
to caitp/angular.js
that referenced
this issue
Feb 6, 2014
The orderBy filter now allows string predicates passed to the orderBy filter to make use property name predicates containing non-ident strings, such as spaces or percent signs, or non-latin characters. Closes angular#6143
@caitp you forgot to label this properly and assign it to a milestone |
done-ish |
caitp
added a commit
to caitp/angular.js
that referenced
this issue
Feb 6, 2014
The orderBy filter now allows string predicates passed to the orderBy filter to make use property name predicates containing non-ident strings, such as spaces or percent signs, or non-latin characters. This behaviour requires the predicate string to be double-quoted. In markup, this might look like so: ```html <div ng-repeat="item in items | orderBy:'\"Tip %\"'"> ... </div> ``` Or in JS: ```js var sorted = $filter('orderBy')(array, ['"Tip %"', '-"Subtotal $"'], false); ``` Closes angular#6143
caitp
added a commit
to caitp/angular.js
that referenced
this issue
Feb 6, 2014
The orderBy filter now allows string predicates passed to the orderBy filter to make use property name predicates containing non-ident strings, such as spaces or percent signs, or non-latin characters. This behaviour requires the predicate string to be double-quoted. In markup, this might look like so: ```html <div ng-repeat="item in items | orderBy:'\"Tip %\"'"> ... </div> ``` Or in JS: ```js var sorted = $filter('orderBy')(array, ['"Tip %"', '-"Subtotal $"'], false); ``` Closes angular#6143
Thank you! |
caitp
added a commit
to caitp/angular.js
that referenced
this issue
Feb 6, 2014
The orderBy filter now allows string predicates passed to the orderBy filter to make use property name predicates containing non-ident strings, such as spaces or percent signs, or non-latin characters. This behaviour requires the predicate string to be double-quoted. In markup, this might look like so: ```html <div ng-repeat="item in items | orderBy:'\"Tip %\"'"> ... </div> ``` Or in JS: ```js var sorted = $filter('orderBy')(array, ['"Tip %"', '-"Subtotal $"'], false); ``` Closes angular#6143
caitp
added a commit
to caitp/angular.js
that referenced
this issue
Mar 19, 2014
The orderBy filter now allows string predicates passed to the orderBy filter to make use property name predicates containing non-ident strings, such as spaces or percent signs, or non-latin characters. This behaviour requires the predicate string to be double-quoted. In markup, this might look like so: ```html <div ng-repeat="item in items | orderBy:'\"Tip %\"'"> ... </div> ``` Or in JS: ```js var sorted = $filter('orderBy')(array, ['"Tip %"', '-"Subtotal $"'], false); ``` Closes angular#6143
caitp
added a commit
to caitp/angular.js
that referenced
this issue
Mar 19, 2014
The orderBy filter now allows string predicates passed to the orderBy filter to make use property name predicates containing non-ident strings, such as spaces or percent signs, or non-latin characters. This behaviour requires the predicate string to be double-quoted. In markup, this might look like so: ```html <div ng-repeat="item in items | orderBy:'\"Tip %\"'"> ... </div> ``` Or in JS: ```js var sorted = $filter('orderBy')(array, ['"Tip %"', '-"Subtotal $"'], false); ``` Closes angular#6143
caitp
added a commit
that referenced
this issue
Mar 21, 2014
The orderBy filter now allows string predicates passed to the orderBy filter to make use property name predicates containing non-ident strings, such as spaces or percent signs, or non-latin characters. This behaviour requires the predicate string to be double-quoted. In markup, this might look like so: ```html <div ng-repeat="item in items | orderBy:'\"Tip %\"'"> ... </div> ``` Or in JS: ```js var sorted = $filter('orderBy')(array, ['"Tip %"', '-"Subtotal $"'], false); ``` Closes #6143 Closes #6144
tbosch
pushed a commit
to tbosch/angular.js
that referenced
this issue
Mar 21, 2014
The orderBy filter now allows string predicates passed to the orderBy filter to make use property name predicates containing non-ident strings, such as spaces or percent signs, or non-latin characters. This behaviour requires the predicate string to be double-quoted. In markup, this might look like so: ```html <div ng-repeat="item in items | orderBy:'\"Tip %\"'"> ... </div> ``` Or in JS: ```js var sorted = $filter('orderBy')(array, ['"Tip %"', '-"Subtotal $"'], false); ``` Closes angular#6143 Closes angular#6144
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I am getting the below exception when a special character, such as '%', is used in the OrderBy filter to sort the object by the key. Can you please suggest a work around for this issue? Thanks!
http://plnkr.co/edit/hNYeujXNcG4HaJc9c3Td?p=preview
The text was updated successfully, but these errors were encountered: