<!doctype html> <html ng-app> <head> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.3/angular.min.js"></script> </head> <body> <div ng-init="names = [{name:'vamshi',city:'hyderabad'},{name:'krishna',city:'secunderabad'},{name:'aman',city:'mumbai'}]"> <label>Name:</label> <input type="text" ng-model="logName" placeholder="Enter your name here!"/> <h1>Hello {{logName}}!</h1><br> <h2>The results will filter as you type</h2> <li ng-repeat="person in names |orderBy : 'name'| filter: logName">{{person.name}} -- {{person.city}}</li> </div> </body> </html>
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy. Accept Learn more