Skip to content

Instantly share code, notes, and snippets.

@toddboom
Created August 22, 2013 03:36
Show Gist options
  • Select an option

  • Save toddboom/6302959 to your computer and use it in GitHub Desktop.

Select an option

Save toddboom/6302959 to your computer and use it in GitHub Desktop.
autocompleteApp = angular.module "autocompleteApp", []
autocompleteApp.controller "AutocompleteCtrl", ["$scope", ($scope) ->
$scope.results = ["one", "two", "three"]
]
<h2>Welcome to AngularJS</h2>
<div ng-app="autocompleteApp" ng-controller="AutocompleteCtrl">
<input ng-model="searchText" placeholder="Search..." type="text">
<ul>
<li ng-repeat="result in results | filter:searchText">{{result}}</li>
</ul>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment