Basic element application of Angularjs

Source: Internet
Author: User

<!DOCTYPE HTML><!--tag Ng-app tells Angularjs to process the entire HTML page and guide the app -<HTMLNg-app>    <Head>        <MetaCharSet= "UTF-8">        <Scriptsrc= "http://code.angularjs.org/angular-1.0.1.min.js"></Script>        <Scriptsrc= "js/controllers.js"></Script>        <!--when binding two curly braces on the title element can achieve our goal, but you may find that the page is loading when they are displayed to the user to See. A better solution is to use Ngbind or ngbindtemplate directives, which are not visible to the user when the page is loaded -        <titleng-bind-template= "Google Phone Gallery: {{' ha ha '}}">Google Phone Gallery</title>    </Head>    <BodyNg-controller= "phonelistctrl">        <!--Two-way binding ng-model= "yourname" -Your name:<inputtype= "text"Ng-model= "yourname"placeholder= "world">        <HR>Hello {{yourname | | |        ' World '}}! <HR>        <!--extracting data from the controller, iterating through the display -        <!--Phonelistctrl controller inside the method -Search:<inputNg-model= "query">        <!--the Orderprop here will take out the default orderprop= "age" inside the controller. -Sort by:<SelectNg-model= "orderprop">          <optionvalue= "name">Name Order</option>          <optionvalue= "age">Age Order</option>        </Select>        <ul>            <!--variables defined by the Phonelistctrl method in the controller phones iterative ng-repeat iteration elements -            <!--the filter function uses the value of query to create a new array that contains only matching query records -            <!--Sort by order binding to the Orderprop element above -            <Ling-repeat= "phone in phones | filter:query | orderby:orderprop">{{phone.name}}<P>{{phone.snippet}}</P>            </Li>            <HR>            <!--Here are some links -            <P>Total number of phones: {{phones.length}}</P>        </ul>        <HR>        <DivNg-controller= "hellowordctrl">Test Controller: {{hello}}</Div>        <HR>        <Table>            <TR><th>Row number</th></TR>            <TRng-repeat= "i in [0, 1, 2, 3, 4, 5, 6, 7]"><TD>{{i}}</TD></TR>        </Table>    </Body></HTML>

Basic element application of Angularjs

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.