Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit 0d04f16

Browse files
SamVerschuerennaomiblack
authored andcommitted
Changed For and If directive to NgFor and NgIf in the user-input section
1 parent d61e884 commit 0d04f16

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

public/docs/js/latest/guide/user-input.jade

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,12 @@
6666
.l-main-section
6767
h2#section-display-the-list-of-todos Display the list of todos
6868
p.
69-
Using the <code>*for</code> iterator, create an <code>&lt;li&gt;</code> for each item in the todos array and set
69+
Using the <code>*ng-for</code> iterator, create an <code>&lt;li&gt;</code> for each item in the todos array and set
7070
its text to the value.
7171

7272
code-example(language="html" format="linenums").
7373
&lt;ul&gt;
74-
&lt;li *for=&quot;#todo of todos&quot;&gt;
74+
&lt;li *ng-for=&quot;#todo of todos&quot;&gt;
7575
{{ todo }}
7676
&lt;/li&gt;
7777
&lt;/ul&gt;
@@ -107,23 +107,23 @@
107107
code-tabs
108108
code-pane(language="javascript" name="TypeScript" format="linenums").
109109
//TypeScript
110-
import {Component, View, bootstrap, For, If} from 'angular2/angular2';
110+
import {Component, View, bootstrap, NgFor, NgIf} from 'angular2/angular2';
111111

112112
@Component({
113113
selector: 'todo-list'
114114
})
115115
@View({
116116
template: `
117117
&lt;ul&gt;
118-
&lt;li *for="#todo of todos"&gt;
118+
&lt;li *ngfor="#todo of todos"&gt;
119119
{{ todo }}
120120
&lt;/li&gt;
121121
&lt;/ul&gt;
122122

123123
&lt;input #todotext (keyup)="doneTyping($event)"&gt;
124124
&lt;button (click)="addTodo(todotext.value)"&gt;Add Todo&lt;/button&gt;
125125
`,
126-
directives: [For, If]
126+
directives: [NgFor, NIf]
127127
})
128128
class TodoList {
129129
todos: Array&lt;string&gt;;
@@ -169,13 +169,13 @@
169169
new angular.ViewAnnotation({
170170
template:
171171
'&lt;ul&gt;' +
172-
'&lt;li *for="#todo of todos">' +
172+
'&lt;li *ng-for="#todo of todos">' +
173173
'{{ todo }}' +
174174
'&lt;/li&gt;' +
175175
'&lt;/ul&gt;' +
176176
'&lt;input #textbox (keyup)="doneTyping($event)">' +
177177
'&lt;button (click)="addTodo(textbox.value)"&gt;Add Todo&lt;/button&gt;',
178-
directives: [angular.For, angular.If]
178+
directives: [angular.NgFor, angular.NgIf]
179179
})
180180
];
181181

0 commit comments

Comments
 (0)