From 6fe86825b51b6139362de2a1af08530e3186614c Mon Sep 17 00:00:00 2001 From: David East Date: Wed, 22 Apr 2015 04:35:13 -0700 Subject: [PATCH] Displaying data clean up. --- public/docs/js/latest/guide/displaying-data.jade | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/public/docs/js/latest/guide/displaying-data.jade b/public/docs/js/latest/guide/displaying-data.jade index 2943ba134f..343e9fcd2c 100644 --- a/public/docs/js/latest/guide/displaying-data.jade +++ b/public/docs/js/latest/guide/displaying-data.jade @@ -260,7 +260,7 @@ new angular.Component({ selector: "display", injectables: [FriendsService] - }), + }), new angular.View({ template: '{{ myName }} <ul> <li *for="#name of names"<{{ name }}>/li< >/ul<', directives: [angular.For, angular.If] @@ -286,7 +286,17 @@ code. <p *if="names.length > 3">You have many friends!</p> p You'll also need to add the If directive so Angular knows to include it. - p [TODO: CODE] + + pre.prettyprint.lang-javascript + code. + //ES5 + directives: [angular.For, angular.If] + pre.prettyprint.lang-typescript + code. + //Typescript + import {Component, View, bootstrap, For, If} from + ... + directives: [For, If] p. As there are currently 5 items it the list, you'll see the message congratulating you on your many friends. Remove two items from the list, reload your browser, and see that the message no longer displays.