Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Commit

Permalink
docs(typeahead): document all allowed attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
jdecool authored and pkozlowski-opensource committed Aug 6, 2013
1 parent a89be34 commit 7fdf730
Showing 1 changed file with 39 additions and 1 deletion.
40 changes: 39 additions & 1 deletion src/typeahead/docs/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,42 @@ It is very well integrated into the AngularJS as it uses subset of the

The `sourceArray` expression can use a special `$viewValue` variable that corresponds to a value entered inside input by a user.

Also this directive works with promises and it means that you can retrieve matches using the `$http` service with minimal effort.
Also this directive works with promises and it means that you can retrieve matches using the `$http` service with minimal effort.

The typeahead directives provide several attributes:

* `ng-model` <i class="icon-eye-open"></i>
:
Assignable angular expression to data-bind to

* `typeahead` <i class="icon-eye-open"></i>
:
Comprehension Angular expression (see [select directive](http://docs.angularjs.org/api/ng.directive:select))

* `typeahead-editable` <i class="icon-eye-open"></i>
_(Defaults: false)_ :
Should it restrict model values to the ones selected from the popup only ?

* `typeahead-input-formatter` <i class="icon-eye-open"></i>
_(Defaults: undefined)_ :
Format the ng-model result after selection

* `typeahead-loading` <i class="icon-eye-open"></i>
_(Defaults: angular.noop)_ :
Binding to a variable that indicates if matches are being retrieved asynchronously

* `typeahead-min-length` <i class="icon-eye-open"></i>
_(Defaults: 1)_ :
Minimal no of characters that needs to be entered before typeahead kicks-in

* `typeahead-on-select` <i class="icon-eye-open"></i>
_(Defaults: null)_ :
A callback executed when a match is selected

* `typeahead-template-url` <i class="icon-eye-open"></i>
:
Set custom item template

* `typeahead-wait-ms` <i class="icon-eye-open"></i>
_(Defaults: 0)_ :
Minimal wait time after last character typed before typehead kicks-in

0 comments on commit 7fdf730

Please sign in to comment.