Favorite: Need to add angular.js file
<HTML><Head> <title></title> <MetaCharSet= "Utf-8"/> <styletype= "Text/css">input{font-size:64px; } </style> <Scriptsrc= "Angular.js"></Script></Head><BodyNg-app= "App.demo"> <DivNg-controller= "Listctrl"> <fieldset> <legend>Users</legend> <ul> <Ling-repeat= "User in Users | by: ' Weight '"> <ahref="#"Ng-click= "Show (user.id)" >{{User.Name}} {{user.weight}}</a> </Li> </ul> </fieldset> <fieldset> <legend>User</legend> <DivNg-show= "User" > <H1>{{User.Name}}</H1> <inputtype= "text"Ng-model= "User.weight" /> </Div> </fieldset> </Div><Scripttype= "Text/javascript"> varmyApp=Angular.module ("App.demo", []); Myapp.factory ("Data", function(){ return{users:[{id:0, Name:"First place", Weight: -}, {ID:1, Name:"second place", Weight: $}, {ID:2, Name:"third place", Weight: -}, {ID:3, Name:"Fourth place", Weight: -}, {ID:4, Name:"fifth place", Weight: -} ]}; }); Myapp.controller ("Listctrl", ["$scope", "Data", function($scope, Data) {$scope. Users=data.users; $scope. Show= function(ID) {$scope. User=Data.users[id]; } }]);</Script></Body></HTML>
[2015-10-28] ANGULARJS-----Data acquisition, correlation