├── LICENSE ├── README.md ├── bower.json ├── dist ├── mdr-select2.js └── mdr-select2.min.js ├── gulpfile.js ├── package.json └── src └── mdr-select2.js /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 modulr 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Angular Select2 2 | Angular Select2 is an Angularjs component that can replacement for select boxes. 3 | 4 | 5 | ![](http://modulr.io/img/preview/mdr-angular-select2.png) 6 | 7 | ## Features 8 | 9 | - Uses the native Angularjs scope for data binding 10 | - Fast and lightweight 11 | - Remote and local data support 12 | - Big data support 13 | 14 | 15 | ## Requirements 16 | 17 | - [Angularjs](https://angularjs.org/) 18 | - [Bootstrap 3.](http://getbootstrap.com/) 19 | - [Selec2.](https://select2.github.io/) 20 | 21 | ## Quick start 22 | 23 | Several quick start options are available: 24 | 25 | - [Download the latest release](https://github.com/Modulr/mdr-angular-select2/archive/master.zip) 26 | - Clone the repo: `git clone https://github.com/Modulr/mdr-angular-select2.git`. 27 | - Install with [Bower](http://bower.io/): `bower install mdr-angular-select2`. 28 | - Install with [npm](https://www.npmjs.com): `npm install mdr-angular-select2`. 29 | 30 | ## What's included 31 | 32 | ``` 33 | mdr-angular-select2/ 34 | dist/ 35 | ├── mdr-select2.js 36 | └── mdr-select2.min.js 37 | ``` 38 | 39 | ## Documentation 40 | 41 | ### Usage 42 | 43 | ##### Load JS 44 | 45 | ```html 46 | 47 | ``` 48 | 49 | ##### Code 50 | 51 | ```js 52 | angular.module('MyApp', ['mdr.select2']) 53 | ``` 54 | 55 | ##### HTML View or Templates 56 | 57 | > Basic Directive 58 | 59 | ```html 60 | 61 | ``` 62 | 63 | > Complete Directive (All attributes) 64 | 65 | ```html 66 | 67 | ``` 68 | 69 | ### API 70 | 71 | ##### Attributes 72 | 73 | Attribute | Type | Description 74 | --- | --- | --- 75 | url | `string` | *Is the path where you get list of items.* 76 | src | `array` | *Collection of objects.* 77 | options | `string` | *Dynamically generate a list of