docs: misc fixes in user input

fixes #159
This commit is contained in:
thierryve 2015-07-04 18:19:04 +02:00 committed by Victor Berchet
parent 73d7bd32e9
commit 61f06fdb5c
1 changed files with 4 additions and 4 deletions

View File

@ -107,7 +107,7 @@
code-tabs code-tabs
code-pane(language="javascript" name="TypeScript" format="linenums"). code-pane(language="javascript" name="TypeScript" format="linenums").
//TypeScript //TypeScript
import {Component, View, bootstrap, NgFor, NgIf} from 'angular2/angular2'; import {Component, View, bootstrap, NgFor} from 'angular2/angular2';
@Component({ @Component({
selector: 'todo-list' selector: 'todo-list'
@ -115,7 +115,7 @@
@View({ @View({
template: ` template: `
<ul> <ul>
<li *ngfor="#todo of todos"> <li *ng-for="#todo of todos">
{{ todo }} {{ todo }}
</li> </li>
</ul> </ul>
@ -123,7 +123,7 @@
<input #todotext (keyup)="doneTyping($event)"> <input #todotext (keyup)="doneTyping($event)">
<button (click)="addTodo(todotext.value)">Add Todo</button> <button (click)="addTodo(todotext.value)">Add Todo</button>
`, `,
directives: [NgFor, NIf] directives: [NgFor]
}) })
class TodoList { class TodoList {
todos: Array<string>; todos: Array<string>;
@ -175,7 +175,7 @@
'</ul>' + '</ul>' +
'<input #textbox (keyup)="doneTyping($event)">' + '<input #textbox (keyup)="doneTyping($event)">' +
'<button (click)="addTodo(textbox.value)">Add Todo</button>', '<button (click)="addTodo(textbox.value)">Add Todo</button>',
directives: [angular.NgFor, angular.NgIf] directives: [angular.NgFor]
}) })
]; ];