I'm having difficulty trying to get this working. I have a grid being generated with data from my db and one of columns i targeted its specific value by assigning it to a ng-model called "hasError1" and another assigned by ng-model to "hasError2". I'm trying to do an ng-class if they are different to give it a specific css class. Here is my code. This ui-grid is in my controller class.
cellTemplate: '<div ng-model="hasError1"></div>'
cellTemplate: '<div ng-model="hasError2" ng-class="{\'amount-error\': hasError1 != hasError2}" </div>'
I put my condition for ng-class to be ng-class="{amount-error: hasError1 != hasError2}"
amount-error is a css class that i have which i set the border to be
border: 1px solid red;
border-right:none;
border-left:none;
I have also tried this below but that didn't work.
ng-class="{1 : \'amount-error\'} [grid.getCellValue(row, grid.columns[index+12]) != grid.getCellValue(row, grid.columns[index+2])]"
amount-errorI'm trying to understand if the problem is with the angular part or the css part. What is the chance that you can create a runnable (it can be simpler example that just reproduce the issue - you can fill the data hardcoded).>afterng-class="{\'amount-error\': hasError1 != hasError2}". Probably it's not the problem..