Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Commit f8c2ec7

Browse files
committed
updating readme to link to docs now that they are all migrated
1 parent c1f8c29 commit f8c2ec7

File tree

1 file changed

+6
-126
lines changed

1 file changed

+6
-126
lines changed

README.md

Lines changed: 6 additions & 126 deletions
Original file line numberDiff line numberDiff line change
@@ -4,143 +4,23 @@ AngularJS-native version of [Select2](http://ivaynberg.github.io/select2/) and [
44

55
- [Demo](http://plnkr.co/edit/a3KlK8dKH3wwiiksDSn2?p=preview)
66
- [Demo Multiselect](http://plnkr.co/edit/juqoNOt1z1Gb349XabQ2?p=preview)
7+
- [Examples](https://github.com/angular-ui/ui-select/blob/master/examples)
8+
- [Documentation](https://github.com/angular-ui/ui-select/wiki)
79

8-
Check [examples](https://github.com/angular-ui/ui-select/blob/master/examples).
910

1011
## Features
1112

12-
- Search and select
13-
- Available themes: Bootstrap, Select2 and Selectize
13+
- Search, Select, and Multi-select
14+
- Themes: Bootstrap, Select2 and Selectize
1415
- Keyboard support
1516
- jQuery not required (except for old browsers)
16-
- Small code base: 400 lines of JavaScript vs 20 KB for select2.min.js
17+
- Small code base: 4.57KB min/gzipped vs 20KB for select2
1718

1819
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).
1920

20-
## Browser compatibility
21-
22-
Starting from Internet Explorer 8 and Firefox 3.6 included.
23-
24-
## Installation using [Bower](http://bower.io/)
25-
26-
27-
- `bower install angular-ui-select`
28-
- Inside your HTML add
29-
- select.js: `<script src="bower_components/angular-ui-select/dist/select.min.js"></script>`
30-
- select.css: `<link rel="stylesheet" href="bower_components/angular-ui-select/dist/select.min.css">`
31-
- Add the `ui.select` module as a dependency: `angular.module("myApp", ["ui.select"]);`
32-
33-
### Bootstrap theme
34-
35-
If you already use Bootstrap, this theme will save you a lot of CSS code compared to the Select2 and Selectize themes.
36-
37-
Bower:
38-
- `bower install bootstrap`
39-
- `<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css">`
40-
- Or the [LESS](http://lesscss.org/) version: `@import "bower_components/bootstrap/less/bootstrap.less";`
41-
42-
[Bootstrap CDN](http://www.bootstrapcdn.com/):
43-
- `<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.css">`
44-
45-
Configuration:
46-
```JavaScript
47-
app.config(function(uiSelectConfig) {
48-
uiSelectConfig.theme = 'bootstrap';
49-
});
50-
```
51-
52-
### Select2 theme
53-
54-
Bower:
55-
- `bower install select2#~3.4.5`
56-
- `<link rel="stylesheet" href="bower_components/select2/select2.css">`
57-
58-
[cdnjs](http://cdnjs.com/):
59-
- `<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/select2/3.4.5/select2.css">`
60-
61-
Configuration:
62-
```JavaScript
63-
app.config(function(uiSelectConfig) {
64-
uiSelectConfig.theme = 'select2';
65-
});
66-
```
67-
68-
### Selectize theme
69-
70-
Bower:
71-
- `bower install selectize#~0.8.5`
72-
- `<link rel="stylesheet" href="bower_components/selectize/dist/css/selectize.default.css">`
73-
- Or the [LESS](http://lesscss.org/) version: `@import "bower_components/selectize/dist/less/selectize.default.less";`
74-
75-
[cdnjs](http://cdnjs.com/):
76-
- `<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.8.5/css/selectize.default.css">`
77-
78-
Configuration:
79-
```JavaScript
80-
app.config(function(uiSelectConfig) {
81-
uiSelectConfig.theme = 'selectize';
82-
});
83-
```
84-
85-
## FAQ
86-
87-
### ng-model not working with a simple variable on $scope
88-
89-
You cannot write:
90-
```HTML
91-
<ui-select ng-model="item"> <!-- Wrong -->
92-
[...]
93-
</ui-select>
94-
```
95-
96-
You need to write:
97-
```HTML
98-
<ui-select ng-model="item.selected"> <!-- Correct -->
99-
[...]
100-
</ui-select>
101-
```
102-
103-
Or:
104-
```HTML
105-
<ui-select ng-model="$parent.item"> <!-- Hack -->
106-
[...]
107-
</ui-select>
108-
```
109-
110-
For more explanations, check [ui-select #18](https://github.com/angular-ui/ui-select/issues/18) and [angular.js #6199](https://github.com/angular/angular.js/issues/6199).
111-
112-
### ng-bind-html gives me "Error: [$sce:unsafe] Attempting to use an unsafe value in a safe context"
113-
114-
You need to use module [ngSanitize](http://docs.angularjs.org/api/ngSanitize) (recommended) or [$sce](http://docs.angularjs.org/api/ng/service/$sce):
115-
116-
```JavaScript
117-
$scope.trustAsHtml = function(value) {
118-
return $sce.trustAsHtml(value);
119-
};
120-
```
121-
122-
```HTML
123-
<div ng-bind-html="trustAsHtml((item | highlight: $select.search))"></div>
124-
```
125-
126-
### I get "TypeError: Object [...] has no method 'indexOf' at htmlParser"
127-
128-
You are using ng-bind-html with a number:
129-
```HTML
130-
<div ng-bind-html="person.age | highlight: $select.search"></div>
131-
```
132-
133-
You should write instead:
134-
```HTML
135-
<div ng-bind-html="''+person.age | highlight: $select.search"></div>
136-
```
137-
138-
Or:
139-
```HTML
140-
<div ng-bind-html="person.age.toString() | highlight: $select.search"></div>
141-
```
14221

14322
## Development
23+
14424
### Prepare your environment
14525
* Install [Node.js](http://nodejs.org/) and NPM (should come with)
14626
* Install global dev dependencies: `npm install -g bower gulp`

0 commit comments

Comments
 (0)