trNgGrid icon indicating copy to clipboard operation
trNgGrid copied to clipboard

Display Name Issue - Beta 3.0

Open rphilp opened this issue 12 years ago • 1 comments

I just want to start off by saying well done on a fantastic grid. I've been playing around with it for a couple days and I'm a big fan so far.

I've noticed 2 problems and will be opening separate issues on both. This one I have a fix for. Trying to customize the display name using display-name="blah" in the html is not working.

The segment below is where I think the problem is. From what I understand, $eval is used to evaluate angular expressions.

var setupColumnTitle = function (scope) {
     if (scope.columnOptions.displayName) {
          scope.columnTitle = scope.$eval(scope.columnOptions.displayName);
     }

If you remove the $eval, it grabs the text directly and uses that as it should.

var setupColumnTitle = function (scope) {
     if (scope.columnOptions.displayName) {
          scope.columnTitle = scope.columnOptions.displayName;
     }

rphilp avatar Jul 16 '14 01:07 rphilp

Well spotted. Fixed in demo.

MoonStorm avatar Jul 17 '14 10:07 MoonStorm