I have 4 switches on one page, all in the $scope.settings model. All the switches have an ng-change='changeShopSettings()' attribute, so every time a switch is changed I expect that my settings will be saved. But the ng-change looks not working. Even when I try ng-change="console.log('test')", I get nothing in my console.
I have 4 switches on one page, all in the $scope.settings model. All the switches have an ng-change='changeShopSettings()' attribute, so every time a switch is changed I expect that my settings will be saved. But the ng-change looks not working. Even when I try ng-change="console.log('test')", I get nothing in my console.
<toggle-switch ng-model="settings.showShop" on-label="Aan" off-label="Uit" ng-change="changeShopSettings()"></toggle-switch>
Controller
Tried also with al $scope.watchCollection("settings"), but that doesn't work too.