Skip to content

Instantly share code, notes, and snippets.

@RangerRick
Created January 15, 2015 21:49
Show Gist options
  • Save RangerRick/1b860ab27daee708697a to your computer and use it in GitHub Desktop.
Save RangerRick/1b860ab27daee708697a to your computer and use it in GitHub Desktop.
angular autocomplete
<div class="tags-wrapper">
<div id="tagsList" class="tags-cloud">
<span ng-repeat="selectedUser in selectedUsers" class="tag" style="padding: 4px 6px; display: inline">
<div class="navy" style="display:inline">{{selectedUser}} <i class="icon ion-close-circled" ng-click="removeTag($index)"></i></div>
</span>
<input type="text" placeholder="User(s)" id="searchInput" ng-keydown="checkKeyDown($event)" class="form-control" ng-model="searchText" ng-change="search()"/>
</div>
<div id="suggestions" class="suggestions-list">
<a ng-repeat="suggestion in suggestions" class="blockSpan" ng-mouseover="$parent.selectedIndex=$index" ng-class="{active : selectedIndex===$index}" ng-click="addToSelectedUsers($index)">{{suggestion}}</a>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment