1. Add three control to the UI: StartTime EndTime Weekdays:
2015-11-17 20:26:40
data-model: Html5在html里的体现
k-checklist-model: kendoUI
ng-click/ng-value/ng-checked: Angular在html里的体现
125Start Time3 469End Time7 810Days Of Week to Run11 12131714 { {item}}1516
js:
1 $scope.checkBoxWeekdays = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']; 2 3 $scope.check = function (value, e) { 4 var idx = $scope.selectedWeekdays.indexOf(value); 5 if (idx >= 0 && !e.target.checked) { 6 $scope.selectedWeekdays.splice(idx, 1); 7 } 8 if (idx < 0 && e.target.checked) { 9 $scope.selectedWeekdays.push(value);10 }11 };
2. ng-change doesn't get the $event argument