AngularJS getting started tutorial (1): static template, angularjs getting started tutorial

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.