Skip to content

Instantly share code, notes, and snippets.

@gpincheiraa
Last active September 28, 2017 03:54
Show Gist options
  • Save gpincheiraa/70780aec1ec13cd963ec47abedaf6aae to your computer and use it in GitHub Desktop.
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
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