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