To illustrate how angularJS enhances standard HTML, we will first create a static HTML page template and then convert this static HTML page template into an AngularJS template that can be displayed dynamically.
In this step, we add the basic information of two phones to the HTML page and reset the working directory to step 1 with the following command.
The code copy is as follows:
git checkout -f step-1
Please edit the app/index.html file, add the following code to the index.html file, and then run the app to view the effect.
app/index.html
The code copy is as follows:
<ul>
<li>
<span>Nexus S</span>
<p>
Fast just got faster with Nexus S.
</p>
</li>
<li>
<span>Motorola XOOM™ with Wi-Fi</span>
<p>
The Next, Next Generation tablet.
</p>
</li>
</ul>
practise
Try adding multiple static HTML code to index.html, for example:
The code copy is as follows:
<p>Total number of phones: 2</p>
Summarize
This step adds a static HTML phone list to the app, now let's go to step 2 to understand how to dynamically generate the same list using AngularJS.