Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why direct JavaScript call doesn't work?
Message
 
 
To
All
General information
Forum:
AngularJS
Category:
Coding, syntax & commands
Title:
Why direct JavaScript call doesn't work?
Miscellaneous
Thread ID:
01656934
Message ID:
01656934
Views:
28
Hi everybody,

If I use in my template the direct expression, it doesn't work, but if I use
 <tr ng-repeat="row in wm.rows ">
                <td class="col-xs-4" ng-class="{selected: row.valueName === wm.selectedRow}">
                    {{row.valueName}}
                </td>
                <td ng-repeat="column in wm.columns track by $index"
                    ng-click="wm.valueClick(row, column, $index);" 
                    ng-class="{selected: $index === wm.selectedIndex && row.valueName===wm.selectedRow}">
                    <span>{{wm.getCellValue(row, column,wm.selectedField)}}</span>
                </td>
            </tr>
I can see it running many times, but it does return values.

The getCellValue is the following:
MatrixGrid.prototype.getCellValue = function (row, column, field) {
       log.info("Searching for row='" + row.valueName + "' column='" + column.valueName + "' field='" + field + "'");
        var cell = _.find(this.matrixValues, { 'rowTmplatId': row.tmplatId, 'columnTmplatId': column.tmplatId });  
       // log.info(cell);
        var cellValue = _.result(cell, field);

        return cellValue;
        
    };
So, calling the method works, but using _.result(...) in {{}} doesn't return any info.

Do you know why and if my solution is OK?

Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Reply
Map
View

Click here to load this message in the networking platform