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.
This commit is contained in:
Jeff Cross 2015-05-19 14:28:26 -07:00
parent 1803016cd7
commit fa8312a1bd
1 changed files with 1 additions and 19 deletions

View File

@ -103,24 +103,6 @@
While you've used <code>template:</code> to specify an inline view, for larger templates you'd
want to move them to a separate file and load them with <code>templateUrl:</code> instead.
p To see Angular dynamically update content, add a line after
code-example(language="html" escape="html").
<p>My name: {{ myName }}</p>
p add this:
pre.prettyprint.lang-html
code.
&lt;p&gt;Current time: {{ time }}&lt;/p&gt;
p.
Then give the <code>DisplayComponent</code> a starting value for time and a call to update time
via <code>setInterval</code>.
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 &lt;li&gt;. 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: