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
import { TodoListController } from "components/todoList.component" | |
describe("TodoListController", () => { | |
let controller | |
beforeEach(() => { | |
controller = new TodoListController() | |
}) | |
it("Should have a defined controller", () => { |
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 {} | |
export const TodoListComponent = { | |
controller: TodoListController | |
} |
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
import { TodoListComponent } from "components/todoList.component" | |
describe("TodoListComponent", () => { | |
let controller | |
beforeEach(() => { | |
controller = new TodoListController() | |
}) | |
it("Should have a defined controller", () => { |
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) | |
} | |
} | |
export const TodoListComponent = { |
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
import { TodoListController } from "components/todoList.component" | |
describe("TodoListController", () => { | |
let controller | |
beforeEach(() => { | |
controller = new TodoListController() | |
}) | |
it("Should have a defined controller", () => { |
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 | |
} |
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
import { TodoListController } from "components/todoList.component" | |
describe("TodoListController", () => { | |
let controller | |
beforeEach(() => { | |
controller = new TodoListController() | |
}) | |
it("Should have a defined controller", () => { |
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 | |
} |
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
<div class="todo-list"> | |
<div ng-repeat="todo in $ctrl.todosList track by $index"> | |
<label> | |
<input type="checkbox" ng-model="todo.completed"> {{todo.name}} | |
<button ng-click="$ctrl.deleteTodo($index)">x</button> | |
</label> | |
</div> | |
</div> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Boolean's Professional Web Development Series</title> | |
</head> | |
<body class="container" ng-strict-di> | |
<header class="app-header"> | |
<h1> | |
Todo List | |
</h1> |