ngSelectBox - An Advanced AngularJS directive for drop-down list

Features

Requirements

AngularJS v1.2.0+

How do I add this to my project?

You can download the minified and unminified version manually from CDN

<script type="text/javascript" src="https://cdn.rawgit.com/nidhishkrishnan/ngSelectBox/master/ngSelectBox.min.js"></script>
<script type="text/javascript" src="https://cdn.rawgit.com/nidhishkrishnan/ngSelectBox/master/ngSelectBox.js"></script>

Adding ngSelectBox Dependency to your app

// Add ngSelectBox as a dependency to your app
angular.module('your-app', ['ngSelectBox']);

Use the below syntax in your templates:

    <ng-select-box ng-model="livingBeing" width="150px">
      <ng-option label="- - Select your choice - -" value="?" selected="true"></ng-option>
      <ng-optgroup label="{{categories.type}}" value="{{categories}}" ng-repeat="categories in zoo">
        <ng-option label="{{livingBeing.name}}" value="{{livingBeing}}" image="{{livingBeing.img}}" ng-repeat="livingBeing in categories.list"></ng-option>
      </ng-optgroup>
    </ng-select-box>

Compared to classic group related drop-down list

Attributes

label

value

width (optional)

selected (optional)

image (optional)

text-color (optional)

Working Demo

Try out the demo : Demo

License

MIT

Contributions

Contributions are very welcome! Please contact me to discuss: nidhishkrishnan@gmail.com