-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
27 lines (25 loc) · 827 Bytes
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
angular.module('todoApp', ['ngMaterial'])
.controller('toDoController', function($scope) {
$scope.tasks = [
{
text: 'Be the best in school'
},{
text: 'Catch all the balls at baseball practice'
},{
text: 'Train dog to sit'
},{
text: 'Travel across campus'
},{
text: 'Search for lost camera'
},{
text: 'Understand angular'
}
];
$scope.addTask = function() {
$scope.tasks.push({text:$scope.taskText});
$scope.taskText ='';
}
$scope.checked = function($index){
$scope.tasks.splice($index, 1);
}
});