AngularJS getting started tutorial (1): static template _ AngularJS

Source: Internet
Author: User
This article mainly introduces AngularJS getting started tutorial (1): static templates. This is the second article in the series. This series will use a project to explain how to use AngularJS, for more information about how angularJS has enhanced the standard HTML, see create a static HTML page template and convert the static HTML page template to an AngularJS template that can be 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.

The 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

The Code is as follows:




  • Nexus S


    Fast just got faster with Nexus S.




  • Motorola XOOM™With Wi-Fi


    The Next, Next Generation tablet.




Exercise

Try to export multiple static html codes to index.html, for example:

The Code is as follows:


Total number of phones: 2


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.