Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why direct JavaScript call doesn't work?
Message
 
 
À
Tous
Information générale
Forum:
AngularJS
Catégorie:
Codage, syntaxe et commandes
Titre:
Why direct JavaScript call doesn't work?
Divers
Thread ID:
01656934
Message ID:
01656934
Vues:
30
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
Répondre
Fil
Voir

Click here to load this message in the networking platform