angularjs - Angular.js - using NG-Grid, how to get the length of value inside cell. Nothing seems to work -


i new angular , ng-grid , trying desperately @ new company speed on it. using ng-grid anugular.js there way format cell using custom cell template if cell contains more x number of characters. i've search web , api , examples cannot find answer one. instance if cell has more 40 characters make background of cell red. doesn't seem .length() function comparison reason.

this works great:

{green: row.getproperty(col.field) > 30}>

but doesn't

{green: row.getproperty(col.field).length() < 40}>
using .length function wrong here or can used inside ng-grid cells? how length of value inside cell?

here basic plnkr based on simple example. http://plnkr.co/edit/fcupoz81vxfgt9sbhznz

thanks

use length instead of length() function. string property not function.

http://plnkr.co/edit/8kb8rje0wnc2opyuwoyz?p=preview


Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -