Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6fe8682

Browse files
committed
Displaying data clean up.
1 parent b5fdd6b commit 6fe8682

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

public/docs/js/latest/guide/displaying-data.jade

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@
260260
new angular.Component({
261261
selector: "display",
262262
injectables: [FriendsService]
263-
}),
263+
}),
264264
new angular.View({
265265
template: '{{ myName }} <ul> <li *for="#name of names"<{{ name }}>/li< >/ul<',
266266
directives: [angular.For, angular.If]
@@ -286,7 +286,17 @@
286286
code.
287287
<p *if="names.length > 3">You have many friends!</p>
288288
p You'll also need to add the If directive so Angular knows to include it.
289-
p [TODO: CODE]
289+
290+
pre.prettyprint.lang-javascript
291+
code.
292+
//ES5
293+
directives: [angular.For, angular.If]
294+
pre.prettyprint.lang-typescript
295+
code.
296+
//Typescript
297+
import {Component, View, bootstrap, For, If} from
298+
...
299+
directives: [For, If]
290300
p.
291301
As there are currently 5 items it the list, you'll see the message congratulating you on your many friends.
292302
Remove two items from the list, reload your browser, and see that the message no longer displays.

0 commit comments

Comments
 (0)