1.0.0 • Published 8 years ago

bonanza-ng v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

Bonanza ng

Angular autocomplete directive using Bonanza

Install

Use it as an npm package:

npm install bonanza-ng --save

Or just download it from bower

bower install bonanza-ng --save

Usage

Use it over an input

<input type="text"
   ng-model="owner"
   bonanza
   bonanza-request="getUsers($query)"
   bonanza-label="firstName + ' ' + lastName"
   bonanza-item-label="firstName + ' ' + lastName + ' (' + email + ')'"
   bonanza-on-select="ownerChanges = ownerChanges + 1"
   bonanza-is-loading="loadingUsers">

You will have to define in the controller a function for the request:

$scope.getUsers = function (query) {
  return usersResource
    .get(query)
    .$promise;
};

Ensure that the function returns a Promise.

License

MIT

1.0.0

8 years ago

0.0.1

9 years ago