angular-data-table icon indicating copy to clipboard operation
angular-data-table copied to clipboard

$parse:syntax Syntax Error on sort

Open getglad opened this issue 9 years ago • 1 comments

If I have a column key name that starts with an int, I get a syntax error from $parse when I try to sort the specific column.

$parse:syntax] Syntax Error: Token 'yrAverageOperatingRatio' is an unexpected token at column 2 of the expression [5yrAverageOperatingRatio] starting at [yrAverageOperatingRatio]

If I rename the key to [ayrAverageOperatingRatio], no such error. If I change to [10yrAverageOperatingRatio], I again get the error.

I found this answer on SO - http://stackoverflow.com/a/28545621/1886901 - any tips on where to apply the change and see if it fixes the error?

getglad avatar Nov 02 '16 15:11 getglad

The issue is like this: $filter in this project here is dependant on $parse in angular here - so there either needs to be some mock filtering changed - or you could rename passed properties to dot notation acceptable names (MSDN reference, dot notation) in passed objects.

Would love to hear if there is a different approach

jonshaffer avatar Nov 10 '16 21:11 jonshaffer