Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $scope.add = function(){ // Function used to add a value to list. Value has name, type, and priority.
- if($scope.thing){
- $scope.items.push(
- {name: $scope.thing,
- type: $scope.worktypeSelection,
- priority: $scope.prioritySelection,
- completed: false
- });
- $scope.items[$scope.items.length - 1] = persistentToDoList.save({command: 'addItem'}, $scope.items[$scope.items.length - 1]);
- $scope.thing = '';
- }
- else{
- alert("Empty task is not allowed!");
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment