From 0d04f161aaf1d6bcd85eb192fdda1c21fd2bfe47 Mon Sep 17 00:00:00 2001 From: Sam Verschueren Date: Thu, 4 Jun 2015 12:43:58 +0200 Subject: [PATCH] Changed For and If directive to NgFor and NgIf in the user-input section --- public/docs/js/latest/guide/user-input.jade | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/public/docs/js/latest/guide/user-input.jade b/public/docs/js/latest/guide/user-input.jade index 008d384cda..2671b34a58 100644 --- a/public/docs/js/latest/guide/user-input.jade +++ b/public/docs/js/latest/guide/user-input.jade @@ -66,12 +66,12 @@ .l-main-section h2#section-display-the-list-of-todos Display the list of todos p. - Using the *for iterator, create an <li> for each item in the todos array and set + Using the *ng-for iterator, create an <li> for each item in the todos array and set its text to the value. code-example(language="html" format="linenums"). <ul> - <li *for="#todo of todos"> + <li *ng-for="#todo of todos"> {{ todo }} </li> </ul> @@ -107,7 +107,7 @@ code-tabs code-pane(language="javascript" name="TypeScript" format="linenums"). //TypeScript - import {Component, View, bootstrap, For, If} from 'angular2/angular2'; + import {Component, View, bootstrap, NgFor, NgIf} from 'angular2/angular2'; @Component({ selector: 'todo-list' @@ -115,7 +115,7 @@ @View({ template: ` <ul> - <li *for="#todo of todos"> + <li *ngfor="#todo of todos"> {{ todo }} </li> </ul> @@ -123,7 +123,7 @@ <input #todotext (keyup)="doneTyping($event)"> <button (click)="addTodo(todotext.value)">Add Todo</button> `, - directives: [For, If] + directives: [NgFor, NIf] }) class TodoList { todos: Array<string>; @@ -169,13 +169,13 @@ new angular.ViewAnnotation({ template: '<ul>' + - '<li *for="#todo of todos">' + + '<li *ng-for="#todo of todos">' + '{{ todo }}' + '</li>' + '</ul>' + '<input #textbox (keyup)="doneTyping($event)">' + '<button (click)="addTodo(textbox.value)">Add Todo</button>', - directives: [angular.For, angular.If] + directives: [angular.NgFor, angular.NgIf] }) ];