Last active
September 28, 2017 03:54
-
-
Save gpincheiraa/70780aec1ec13cd963ec47abedaf6aae to your computer and use it in GitHub Desktop.
todoList.component.js- 3 First Impressions using jest for TDD over AngularJS > 1.5.x — Part I
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class TodoListController { | |
constructor(){ | |
this.todosList = [] | |
} | |
addTodo(todo){ | |
this.todosList.push(todo) | |
} | |
toggleCheckTodo(index){ | |
this.todosList[index].completed = !this.todosList[index].completed | |
} | |
} | |
export const TodoListComponent = { | |
controller: TodoListController | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment