This repository has been archived by the owner on Oct 2, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
34 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,38 @@ | ||
ui-select [![Build Status](https://travis-ci.org/angular-ui/ui-select.png)](https://travis-ci.org/angular-ui/ui-select) | ||
========= | ||
# AngularJS ui-select [![Build Status](https://travis-ci.org/angular-ui/ui-select.png)](https://travis-ci.org/angular-ui/ui-select) | ||
|
||
A native version of select2. | ||
AngularJS-native version of [Select2](http://ivaynberg.github.io/select2/) and [Selectize](http://brianreavis.github.io/selectize.js/). | ||
|
||
### Prototype usage: | ||
See the [online demo](http://plnkr.co/edit/GtOOWE?p=preview). | ||
|
||
```html | ||
<ui-select ng-model="data.custom" style="width:300px"> | ||
<match placeholder="Pick one...">{{$select.selected.name}}</match> | ||
<choices data="data.items | filter : $select.search"> | ||
<div ng-bind-html="trustAsHtml((item.name | highlight:$select.search))"/></div> | ||
<div> {{item.email}} </div> | ||
</choices> | ||
</ui-select> | ||
## Features | ||
|
||
- Search and select | ||
- Support themes from Select2 (default theme) and Selectize (default, Bootstrap 2 & 3 themes) | ||
- Keyboard support | ||
- jQuery not required (except for old browsers) | ||
|
||
For the roadmap, check [issue #3](https://github.com/angular-ui/ui-select/issues/3) and the [Wiki page](https://github.com/angular-ui/ui-select/wiki/Roadmap). | ||
|
||
## Browser support | ||
|
||
Starting from Internet Explorer 8 and Firefox 3.6 included. | ||
|
||
## Installation using [Bower](http://bower.io/) | ||
|
||
- `bower install angular-ui-select` | ||
- Inside your HTML add `<script src="bower_components/ui-select/src/select.js"></script>` | ||
- Add one of the themes supported by Select2 `<link rel="stylesheet" href=".../select2.css">` or Selectize `<link rel="stylesheet" href=".../selectize.*.css">` | ||
- Check the [online demo](http://plnkr.co/edit/GtOOWE?p=preview) to see how to use ui-select | ||
|
||
## Run the tests | ||
|
||
Install [Node.js](http://nodejs.org/), then inside a console: | ||
``` | ||
npm update # Installs all Grunt dependencies (package.json) inside node_modules directory | ||
bower update # Installs all ui-select dependencies (bower.json) inside bower_components directory | ||
``` | ||
|
||
To run the tests: | ||
``` | ||
grunt test # Launches Karma | ||
``` |