I'm trying to pass a parameter (true, false) to a filter in a custom directive, but I always get an 'undefined'.
<job jobs="jobs" activateFilter="activateFilter">
In a controller (outside of customDirective):
$scope.activateFilter = true;
This is the directive:
...
restrict: 'E',
scope: {
jobs: "=jobs",
activateFilter: "=activateFilter"
},
controller: controller,
templateUrl: "/views/templates/job.html"
...
And this is the template:
... data-ng-repeat="job in jobs | customFilter:activateFilter ...
Any ideas what I'm doing wrong? activateFilter is always undefined. Thanks!!