SEARCHING DATA IN ANGULARJS

Ankit Singh

Total Post:341

Points:2389
Posted by  Ankit Singh
 530  View(s)
Ratings:
Rate this:
We want to Searching data in angularjs.How to do this please help me.
  1. aditya kumar Patel

    Post:254

    Points:1810
    Re: Searching data in angularjs

    @{

    Layout = null;

    }

    <!DOCTYPE html>

    <html>

    <head>

    <title>Forum</title>

    <meta name="viewport" content="width=device-width" />

    <script src="~/Scripts/jquery-1.9.1.js"></script>

    <script src="~/Scripts/angular.js"></script>

    <style>

    .inputText {

    border: 1px solid #ccc;

    border-radius: 10px;

    background-color: #FAF9FD;

    box-shadow: 1px 1px 1px 1px #ccc;

    width: 230px;

    height: 30px;

    }

    ul {

    list-style: none;

    padding: 10px;

    background-color: #FFFFFF;

    border-radius: 10px;

    border: 1px solid #ccc;

    width: 210px;

    }

    li {

    border: 1px solid #ccc;

    border-right: none;

    border-left: none;

    padding: 2px;

    text-align: center;

    }

    </style>

    </head>

    <body ng-app ng-init="states=['ANDHRA PRADESH','ASSAM','GUJRAT','BIHAR','HARYANA','HIMACHAL PRADESH','JAMMU & KASHMIR','MANIPUR','MAHARASHTRA'];">

    <div>

    <input type="text" ng-model="curPlace" class="inputText">

    <ul>

    <li ng-repeat="place in states | filter:curPlace">

    <a ng-href="https://www.google.co.in/webhp?q={{place}}">{{place}} </a>

    </li>

    </ul>

    </div>

    </body>

    </html>

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!