<!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)