Home > DeveloperSection > Forums > Searching data in angularjs
Ankit Singh

Total Post:341

Points:2389
Posted on    February-28-2016 10:52 PM

 Angular JS Angular JS 
Ratings:


 1 Reply(s)
 250  View(s)
Rate this:
We want to Searching data in angularjs.How to do this please help me.


aditya kumar Patel

Total Post:244

Points:1736
Posted on    February-28-2016 10:54 PM

@{

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>


Don't want to miss updates? Please click the below button!

Follow MindStick