Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Step 13.5: Added events and usage of the new component
  • Loading branch information
dotansimha authored and Dotan Simha committed Nov 22, 2016
1 parent 7aa9156 commit 9b0019c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions client/imports/components/list-show.component.ts
Expand Up @@ -22,6 +22,7 @@ export class ListShowComponent implements OnInit {
private editing : boolean = false;
private editModel : any;
private newItemModel : string = '';
private editingTodo : number | boolean;

constructor(private currentRoute: ActivatedRoute, private router: Router) {
this.editModel = {
Expand Down Expand Up @@ -100,13 +101,12 @@ export class ListShowComponent implements OnInit {
}
}

getContextForItem(todo) {
return {
todo: todo,
editing: false,
onEditingChange(editing) {

},
onTodoItemEditChange(event) {
if (event.editing) {
this.editingTodo = event.todoId;
}
else {
this.editingTodo = false;
}
}
}

0 comments on commit 9b0019c

Please sign in to comment.