From 7fdf73016b09a89651759582c7a1bb1d3741964d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20DECOOL?= Date: Tue, 6 Aug 2013 00:50:12 +0200 Subject: [PATCH] docs(typeahead): document all allowed attributes --- src/typeahead/docs/readme.md | 40 +++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/src/typeahead/docs/readme.md b/src/typeahead/docs/readme.md index 22fcf0ba8e..6c6ce507e1 100644 --- a/src/typeahead/docs/readme.md +++ b/src/typeahead/docs/readme.md @@ -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. \ No newline at end of file +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` + : + Assignable angular expression to data-bind to + +* `typeahead` + : + Comprehension Angular expression (see [select directive](http://docs.angularjs.org/api/ng.directive:select)) + +* `typeahead-editable` + _(Defaults: false)_ : + Should it restrict model values to the ones selected from the popup only ? + +* `typeahead-input-formatter` + _(Defaults: undefined)_ : + Format the ng-model result after selection + +* `typeahead-loading` + _(Defaults: angular.noop)_ : + Binding to a variable that indicates if matches are being retrieved asynchronously + +* `typeahead-min-length` + _(Defaults: 1)_ : + Minimal no of characters that needs to be entered before typeahead kicks-in + +* `typeahead-on-select` + _(Defaults: null)_ : + A callback executed when a match is selected + +* `typeahead-template-url` + : + Set custom item template + +* `typeahead-wait-ms` + _(Defaults: 0)_ : + Minimal wait time after last character typed before typehead kicks-in