var app = angular.module('app', ['wj']); app.controller('appCtrl', function ($scope) { $scope.cv = new wijmo.collections.CollectionView([{ value: -1 }, { value: 1 }, { value: 2 }]); // 回避方法 // $scope.cv.getError = getError; $scope.initialized = function (s, e) { $scope.cv.getError = getError; } }); var getError = function (item, property) { return item[property] < 0 ? 'エラー' : null; };
<div ng-app="app" ng-controller="appCtrl"> <wj-flex-grid items-source="cv" initialized="initialized(s,e)"></wj-flex-grid> </div>