diff --git a/checklist-model.js b/checklist-model.js index de3f64f..a7946e5 100644 --- a/checklist-model.js +++ b/checklist-model.js @@ -86,7 +86,7 @@ angular.module('checklist-model', []) setValueInChecklistModel(getChecklistValue(), newValue); if (checklistChange) { - checklistChange(scope); + checklistChange(scope, { "$checked": newValue }); } }); diff --git a/docs/blocks/event/ctrl.js b/docs/blocks/event/ctrl.js index 3333787..8ab669d 100644 --- a/docs/blocks/event/ctrl.js +++ b/docs/blocks/event/ctrl.js @@ -7,7 +7,14 @@ app.controller('Ctrl5', function($scope) { }; $scope.testValue = 'Im not changed yet!'; - $scope.imChanged = function(){ + $scope.imChanged = function(checked, key) { + if (checked) { + console.log(key + " activated") + } + else { + console.log(key + " deactivated") + } + $scope.testValue = $scope.user.roles.join(','); } $scope.shouldChange = function(key){ diff --git a/docs/blocks/event/view.html b/docs/blocks/event/view.html index 4ad4bb3..4d0809a 100644 --- a/docs/blocks/event/view.html +++ b/docs/blocks/event/view.html @@ -1,3 +1,3 @@ \ No newline at end of file diff --git a/index.html b/index.html index c1fbe6a..51081f4 100644 --- a/index.html +++ b/index.html @@ -909,7 +909,7 @@