Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
  • How to sort the real time data from a text box using Angular JS

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 309
    Comment on it

    Hello Readers, If your web page have multiple lists of words and you want to sort them in real time. Then by using Angular js you can do it. Let's see how it will work.

    <!DOCTYPE html>
    <script src=""></script>
    <div ng-app="myApp" ng-controller="namesCtrl">
    <p>Filtering input:</p>
    <p><input type="text" ng-model="test"></p>
      <li ng-repeat="x in names | filter:test | orderBy:'country'">
        {{ ( | uppercase) + ', ' + }}
    <script src="namesController.js"></script>

    Now when you type inside the text box then only the matching country words will be remain on page while all other words will be hidden.

 0 Comment(s)

Sign In

Sign up using

Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: