From fa8312a1bd230e0167446167bb31afab746a9184 Mon Sep 17 00:00:00 2001 From: Jeff Cross Date: Tue, 19 May 2015 14:28:26 -0700 Subject: [PATCH] refactor(guide): remove setInterval example It distracts from the flow of this step of the guide, and isn't used in the rest of the guide. The use case of updating data is better covered in the next step of the guide. --- .../docs/js/latest/guide/displaying-data.jade | 20 +------------------ 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/public/docs/js/latest/guide/displaying-data.jade b/public/docs/js/latest/guide/displaying-data.jade index b249074f4f..73f7d2940b 100644 --- a/public/docs/js/latest/guide/displaying-data.jade +++ b/public/docs/js/latest/guide/displaying-data.jade @@ -103,24 +103,6 @@ While you've used template: to specify an inline view, for larger templates you'd want to move them to a separate file and load them with templateUrl: instead. - p To see Angular dynamically update content, add a line after - - code-example(language="html" escape="html"). -

My name: {{ myName }}

- - p add this: - pre.prettyprint.lang-html - code. - <p>Current time: {{ time }}</p> - p. - Then give the DisplayComponent a starting value for time and a call to update time - via setInterval. - - pre.prettyprint.lang-javascript - code. - setInterval(function () { this.time = (new Date()).toString(); }.bind(this), 1000); - p Reload the page in your browser and you'll now see the seconds updating automatically. - .l-main-section h2#Create-an-array Create an array property and use For on the view p Moving up from a single property, create an array to display as a list. @@ -182,7 +164,7 @@ p Reload and you've got your list of friends! p. - Again, Angular will mirror changes you make to this list over in the DOM. Add a new item and it appears in your + Angular will mirror changes you make to this list over in the DOM. Add a new item and it appears in your list. Delete one and Angular deletes the <li>. Reorder items and Angular makes the corresponding reorder of the DOM list. p Let's look at the few lines that do the work again: