angular-ui/ng-grid — pull request #1243 by cbayram (2014-06-12 05:04:35+00:00)
Title: Use bracket notation accessing column field names

AngularJS Expressions for object keys containing hyphen/dash require bracket notation for correct evaluation.

{{obj.something-with-hyphen}} VS {{obj['something-with-hyphen']}}

The pull request fixes bugs in the cell value derivation, sorting, primaryKey configuration and selection when dealing with simple and/or complex field names which contain characters such as hyphen that require bracket notation.

There are numerous "obj.some.complex.property" tests in the test-ci grunt task that is run. They all passed. For example:
"should allow editing of complex properties" on line 190 of [https://github.com/angular-ui/ng-grid/blob/master/test/unit/directivesSpec.js](https://github.com/angular-ui/ng-grid/blob/master/test/unit/directivesSpec.js)

I've gone ahead and created two plunkrs to demonstrate the problem and its resolution with obj.some.complex.property. Hope this helps!

[Current with the problem](http://plnkr.co/edit/6RkZHxbEQTNfj2dtMeAS?p=preview) - AngularJS expression for the fields are being parsed as minus operator for field names with hyphens in them. Hence, showing a value of zero as it's trying to subtract to undefined values converted to numbers.

[My pull request with the solution](http://plnkr.co/edit/sGkYN2mdRkTZsr89xOS7?p=preview) - same dataset

Thanks!