This directive let you create an autocomplete suggestion box, if you're using angular material framework. I hope this will save you some time. Dont forget to copy the css.
None
Load this directive with the following code:
<script type="text/javascript" src="angular-material-autocomplete.js"></script>
Add a dependency to the module in your own module.
var app = angular.module('ModuleName', ['angular-material-autocomplete']);
Use the directive in your HTML files with the following code:
<m-auto-complete flex="80" layout="column" placeholder="Enter comment" suggestions="viewModel.autoCompleteSuggestionsArray" ng-model="viewModel.comment"></m-auto-complete>
- suggestions (array: required) suggestions array
- ng-model (required)
Take a look at index.html or here for a demo.
You may use it however you want. If you can, then leave the comment in js file as it is.