charlieridley / ember-typeahead

EmberJS autocomplete component using typeahead.js
MIT License
78 stars 17 forks source link

Ember Typeahead.js Component

An autocomplete component for ember.js using typeahead.js

Installation

Install using Bower

bower install ember-typeahead

Usage

Include typeahead.js and ember-typeahead.js

<script src="https://github.com/charlieridley/ember-typeahead/raw/master/typeahead.js"></script> 
<script src="https://github.com/charlieridley/ember-typeahead/raw/master/ember-typeahead.js"></script> 

Add the typeahead tag in your handlebars template

{{type-ahead data=content name="colour" selection=myColour}}

Since ember-typeahead extends Ember.TextField, you can still bind other properties such as value and action:

{{type-ahead data=content name="colour" selection=myColour action=createNewColour value=colourText}}

Properties

Tests

I didn't do any tests. For every line of untested code a puppy dies. 59 puppies died in the making of this component.