AngularJS (i)

Source: Internet
Author: User

<!DOCTYPE HTML><HTMLNg-app="">          <!--the NG-APP directive marks the scope of the Angularjs script -<Head>    <MetaCharSet= ' Utf-8 '>    <title>Angular JS</title>    <Scripttype= "Text/javascript"src= ' Http://www.runoob.com/try/angularjs/1.2.5/angular.min.js '></Script></Head><Body>    <Div>Your name:<inputtype= ' text 'Ng-model= "Yourname"Ng-init= "Yourname= word">          <BR/>        <!--The ng-model directive binds the element value (such as the value of the input field) to the application -        <!--ng-init initializing variable values -Hello {{yourname}}! <!--{{}} Binding expression -        <BR/>Helllo<spanNg-bind= "Yourname"></span> <BR>    <!--ng-bind binding expression, similar to {{}} -        <!--Add Filter -Hello {{yourname|uppercase}}<BR>   <!--Uppercase -Hello {{yourname|lowercase}}<BR> <!--lowercase -Hello {{yourname|currency}}<BR> <!--Convert to Currency form -        <!--See you next . -        <!--Filter:name See the next -        <P>1+2={{1+2}}</P>    </Div>        <DivNg-controller= "Phonelistctrl">        <!--Defining the Controller -        <inputNg-model= ' name '>          <ul>            <Ling-repeat= "Phone in phones |orderby: ' Snippet ' |filter:name">   <!--ng-repeat traversing an array -{{Phone.name}}<P>{{Phone.snippet}}</P>            </Li>          </ul>    </Div>    <DivNg-controller= ' PersonController '>FirstName:<inputTyep= ' text 'Ng-model= "Person.firstname"><BR>LastName:<inputtype= ' text 'Ng-model= "Person.lastname"><BR>MyName is {{person.firstname+ ' "" +person.lastname}}</Div>    <Scripttype= "Text/javascript">    functionPhonelistctrl ($scope) {$scope. Phones=[            {"name":"Nexus S",            "Snippet": "Fast just got faster with Nexus S."},            {"name":"Vivo X3",            "Snippet":"Keep Moving"},            {"name":"Iphone6",            "Snippet":"Make anything impossiable"}        ]; }        functionPersonController ($scope) {$scope. person={firstname:"JACK", LastName:"Rose"        }    }    </Script></Body></HTML>

AngularJS (i)

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.