ng-selectize
Description
AngularJS wrapper for Selectize.
Demo
Requirements
Install
- Manually
Download latest release here.
- NPM
npm install ss-ng-selectize
- Bower
bower install ss-ng-selectize
Setup
<!--Need just for option of auto width functionality.-->
angular;
Usage
var ctx = this; ctxconfig = valueField: "id" labelField: "text" ctxoptions = id: "1" text: "Option - 1" id: "2" text: "Option - 2" id: "3" text: "Option - 3" id: "4" text: "Option - 4" id: "5" text: "Option - 5" ctxvalue = null;
Additional
- Default options
In addition to pass options with options attribute you can set them in html.
Option - 1
- Disabled and Required
Use to set dropdown as disabled or required.
- On change
Simplified method to detect changes.- Includes new and old value.
- Multiple
Use to set dropdown as multiple.- Includes remove_button plugin.
- Tag
Use to add tag functionality.- Includes special tag validation function. Accept tag value and return bool. (Optional)
- Includes ability to change text Add. (Optional)
- Includes option adding to options list if ng-model has a value but this value not exists in the options list.
- Includes restore_on_backspace plugin.
- No default
By default if no value in ng-model, the value will be set to first option if it exists. Use it to off this functionality.- Includes similiar check to off default tag option.
- Parse
By default dropdown set a string typed value to ng-model. Use it to parse a value to int or bool before setting the value.
- Auto width
Use to set auto width for the options block.- Need to include styles from css folder.