I'm relatively new to AngularJS, and I'm attempting to build a simple Whiskey search application. Angular makes it easy to bind an input element and my results, but the results filter as the user is typing. I don't want the filter to happen until the user hits Enter.
Here is my code for the input search:
<input type="text" class="form-control" placeholder="start typing and hit enter" ng-model="query">
And here is my results:
<div class="col-lg-12" ng-controller="WhiskeyListCtrl">
<div class="row">
<div class="col-sm-3" ng-repeat="whiskey in whiskeys | filter:query">
<div class="whiskey-container">
<a href="#/whiskeys/{{whiskey.id}}"><img ng-src="{{whiskey.images[0]}}" height="200" width="200"/></a>
<whiskey-title></whiskey-title>
<whiskey-desc></whiskey-desc>
</div>
</div>
</div>
</div>
Any help would be greatly appreciated!