Home > Web Front-end > JS Tutorial > AngularJS Getting Started Tutorial (1): Static Template_AngularJS

AngularJS Getting Started Tutorial (1): Static Template_AngularJS

WBOY
Release: 2016-05-16 16:28:31
Original
1579 people have browsed it

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 the two mobile phones to the HTML page, and use the following command to reset the working directory to step 1.

Copy code The code 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 application to see the effect.

app/index.html

Copy code The code is as follows:



  •                                                                                                                                                                           Fast just got faster with Nexus S.
                                                                                       


  •                                                                                                               Motorola                                                                                       The Next, Next Generation tablet.
                                                                                       






Practice

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

Copy code

The code is as follows:

Total number of phones: 2

Summary

This step adds a static HTML phone list to the app, now let’s move to step 2 to learn how to dynamically generate the same list using AngularJS.
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template