Created
January 29, 2013 09:38
-
-
Save jamesmartin/4663046 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ul { | |
list-style-type: none; | |
padding-left: 0; | |
margin-left: 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html ng-app> | |
<head> | |
<script | |
src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.4/angular.min.js"></script> | |
<script src="autocomplete.js"></script> | |
<link rel="stylesheet" href="autocomplete.css"> | |
<link rel="stylesheet" | |
href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css"> | |
</head> | |
<body> | |
<h2>Autocomplete</h2> | |
<div ng-controller='AutoCompleteController'> | |
<input type="search" ng-model='query' /> | |
<ul ng-show='query' class="typeahead-x dropdown-menu-x"> | |
<li ng-repeat='person in people | filter:query'>{{person.text}}</li> | |
</ul> | |
</div> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function AutoCompleteController($scope) { | |
$scope.people = [ | |
{text: 'Joe Blogs'}, | |
{text: 'Jack Black'} | |
]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment