1.0.3 • Published 9 years ago

wr-angular-select v1.0.3

Weekly downloads
4
License
ISC
Repository
github
Last release
9 years ago

wr-angular-select

angular select widget based on jQuery select2 and select2 bootstrap css

Dependencies

Install

npm install wr-angular-select

Usage

.....
<!-- select2.css and bootstrap-select2.css -->
<script src="..../angular-clickout/angular-clickout.min.js"></script>
<script src="wr-angular-select/dist/wr-angular-select.min.js"></script>
.....

<wr-select data-ng-model="myModel" 
           data-options="myOptions" <!-- array or promise -->
           data-search="searchText" <!-- optional -->
           data-placeholder="placeholder" <!-- optional, default "Select" -->
           data-label="labelProp" <!-- default 'label' -->
           data-value="valueProp" <!-- default 'value', if set to "", then ng-model will be set to option object --> ></wr-select>
angular.module('myApp', ['wr-select'])

Async search

It is possible to pass promise in options to wr-select, e.g. on change search text. It will handle this promise.

TODO:

  • multiselect
1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago