I have a table that contains a boolean column for each rows. I want to implement a checkbox which is for filtering that will be a predicate of the boolean column. I know there's nice example to achieve this https://github.com/lorenzofox3/Smart-Table/issues/387 but it's not working for me.
I've put following element to the html:
<tr>
<custom-check predicate="myColumn"></custom-check>
</tr>
And JS:
app.directive('customCheck', function () {
return {
restrict: 'E',
scope: {
predicate: '@'
},
require: '^stTable',
template: '<input type="checkbox" ng-model="sel" ng-change="change()"/>',
link: function (scope, element, attr, ctrl) {
scope.change = function change () {
// I guess I need to make ajax call here
//ctrl.search(scope.sel, scope.predicate);
}
}
}
});
But it produces following error to Firebug console.
Error: [$compile:ctreq] http://errors.angularjs.org/1.2.14/$compile/ctreq?p0=stTable&p1=customCheck
What's wrong? Any references or working example would be highly appreciated.