From 32a41bc738bdaa7e353ff00142e797a5bebf37c5 Mon Sep 17 00:00:00 2001 From: Pawel Kozlowski Date: Wed, 4 Apr 2018 14:39:07 +0200 Subject: [PATCH] test(ivy): fixes in the TodoMVC example (#23161) - properly display initial checked state - properly remove a todo Please note that the 'archive' option still doesn't work correctly as listening to component outputs doesn't seem to work (onArchive() is never called). PR Close #23161 --- packages/core/test/bundling/todo/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/core/test/bundling/todo/index.ts b/packages/core/test/bundling/todo/index.ts index ab325079f9..f4a49d992e 100644 --- a/packages/core/test/bundling/todo/index.ts +++ b/packages/core/test/bundling/todo/index.ts @@ -33,7 +33,7 @@ export class AppState { // but NgForOf expects creation and binding separate. template: `
- &ngsp; + &ngsp; {{todo && todo.text}}&ngsp;
@@ -71,7 +71,7 @@ export class ToDoAppComponent { onArchive(item: ToDo) { const todos = this.appState.todos; - todos.splice(todos.indexOf(item)); + todos.splice(todos.indexOf(item), 1); markDirty(this); } } @@ -108,4 +108,4 @@ export class ToDoAppModule { renderComponent(ToDoAppComponent, { // TODO(misko): This should run without injector. injector: createInjector(ToDoAppModule) -}); \ No newline at end of file +});