Angular directive to create autocompletes with materialize-css
bower install angular-materializecss-autocomplete
npm i angular-materializecss-autocomplete
Import the file in your index.
<script src="app/angular-materializecss-autocomplete.js"></script>
Declare a dependency on principal module
angular.module('myModule', ['angularMaterializeAutoComplete']);
In your view declare the directive
<auto-complete model="vm.cidade" func="vm.getDragons" property="name" icon-prefix="textsms" label="olosco"></auto-complete>
Atributte | Required | Description |
---|---|---|
model '=' |
true | Model of input |
label '@' |
true | Label of input |
func '&' |
true | Function to return data (promisse or array) |
iconPrefix '@' |
false | Incon of input |
property '@' |
true | Property of data object display in search |
onSelect '&' |
false | A callback executed when a match is selected |
onModelChanged '&' |
false | A callback executed on model change |
validadeObject '&' |
false | in progress |
limit '@' |
false | in progress |