-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathindex.html
138 lines (130 loc) · 4.66 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<!DOCTYPE html>
<html lang="en" ng-app="demo" ng-strict-di>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
padding: 15px;
}
.form-group {
padding-top: 15px;
padding-bottom: 15px;
}
pre {
max-height: 300px;
}
.control-label {
text-align: left !important;
}
</style>
</head>
<body ng-controller="DemoCtrl as vm">
<form class="form-horizontal">
<fieldset>
<legend>sc-select demo</legend>
<div class="row form-group">
<label class="control-label col-md-7">Single</label>
<div class="col-md-7">
<sc-select
ng-model="vm.singlePerson"
sc-options="person.email as person.name for person in vm.people"
placeholder="Select or search a person in the list...">
</sc-select>
</div>
<div class="col-md-7">
<pre ng-if="vm.singlePerson">{{vm.singlePerson | json}}</pre>
</div>
</div>
<div class="row form-group">
<label class="control-label col-md-7">Single async</label>
<div class="col-md-7">
<sc-select
ng-model="vm.singleAsyncTrack"
sc-options="artist as artist.name for artist in vm.searchAsync(searchText, page)"
page-limit="vm.asyncPageLimit"
total-items="vm.totalResults"
placeholder="Search for a song"
loading-delay="200">
</sc-select>
</div>
<div class="col-md-7">
<pre ng-if="vm.singleAsyncTrack">{{vm.singleAsyncTrack | json}}</pre>
</div>
</div>
<div class="row form-group">
<label class="control-label col-md-7">Multiple</label>
<div class="col-md-7">
<sc-select
ng-model="vm.multiplePeople"
sc-options="person as person.name for person in vm.people"
multiple="true"
placeholder="Select or search a person in the list...">
</sc-select>
</div>
<div class="col-md-7">
<pre ng-if="vm.multiplePeople">{{vm.multiplePeople | json}}</pre>
</div>
</div>
<div class="row form-group">
<label class="control-label col-md-7">Multiple async</label>
<div class="col-md-7">
<sc-select
ng-model="vm.multipleAsyncTracks"
sc-options="artist as artist.name for artist in vm.searchAsync(searchText, page)"
page-limit="vm.asyncPageLimit"
total-items="vm.totalResults"
placeholder="Search for a song"
multiple="true">
</sc-select>
</div>
<div class="col-md-7">
<pre ng-if="vm.multipleAsyncTracks">{{vm.multipleAsyncTracks | json}}</pre>
</div>
</div>
<div class="row form-group">
<label class="control-label col-md-7">Multiple limited to 3 items</label>
<div class="col-md-7">
<sc-select
ng-model="vm.multipleLimit"
sc-options="person as person.name for person in vm.people"
placeholder="Select or search a person in the list..."
multiple="true"
multiple-limit="3">
</sc-select>
</div>
<div class="col-md-7">
<pre ng-if="vm.multipleLimit">{{vm.multipleLimit | json}}</pre>
</div>
</div>
<div class="row form-group">
<label class="control-label col-md-7">Grouped</label>
<div class="col-md-7">
<sc-select
ng-model="vm.groupedPeople"
sc-options="person.email as person.name for person in vm.people"
placeholder="Select or search a person in the list..."
group-by="vm.groupBy">
</sc-select>
</div>
<div class="col-md-7">
<pre ng-if="vm.groupedPeople">{{vm.groupedPeople | json}}</pre>
</div>
</div>
<div class="row form-group">
<label class="control-label col-md-7">Disabled</label>
<div class="col-md-7">
<sc-select
ng-model="vm.selectedPerson"
sc-options="person.email as person.name for person in vm.people"
placeholder="Select or search a person in the list..."
ng-disabled="true">
</sc-select>
</div>
</div>
</fieldset>
</form>
<script src="bundle.js"></script>
</body>
</html>