AngularJS getting started tutorial (1): static template, angularjs getting started tutorial
To demonstrate how angularJS has enhanced standard HTML, we will first create a static HTML page template, and then convert this static HTML page template into an AngularJS template that is dynamically displayed.
In this step, we add the basic information of the two mobile phones to the HTML page and use the following command to reset the working directory to step 1.
Copy codeThe Code is as follows:
Git checkout-f step-1
Edit the app/index.html file, copy the following code to the index.html file, and run the application to view the effect.
App/index.html
Copy codeThe Code 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>
Exercise
Try to export multiple static html codes to index.html, for example:
Copy codeThe Code is as follows:
<P> Total number of phones: 2 </p>
Summary
This step adds a static HTML mobile phone list to the application. Now let's go to step 2 to learn how to use AngularJS to dynamically generate the same list.