I have the following snippet;
vm.products = Product.query();
$scope.$watch("vm.filterType1", function (val) {
vm.products = $filter('filter')('id', 1);
console.log('watcher');
});
html
<switch ng-model="vm.filterType1" class="green"></switch>
But nothing happends when i change the switch - nothing gets logged in the console? It runs on load, but not on change.