This repository was archived by the owner on Jan 22, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +78
-1
lines changed Expand file tree Collapse file tree 5 files changed +78
-1
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
5
5
## [ Unreleased]
6
6
### Added
7
7
- multiple support for select field
8
+ - slider field with min, max, step and discrete options
8
9
9
10
## [ 0.4.0] - 2015-11-17
10
11
### Added
Original file line number Diff line number Diff line change @@ -218,6 +218,38 @@ delete-hint attribute value
218
218
}
219
219
```
220
220
221
+ ### slider
222
+
223
+ ** min (number, optional)**
224
+
225
+ default 1
226
+
227
+ ** max (number, optional)**
228
+
229
+ default 100
230
+
231
+ ** step (number, optional)**
232
+
233
+ default 1
234
+
235
+ ** discrete (boolean, optional)**
236
+
237
+ default false (md-discrete)
238
+
239
+ ``` javascript
240
+ {
241
+ " type" : " slider" ,
242
+ " key" : " rate" ,
243
+ " templateOptions" : {
244
+ " theme" : " custom" ,
245
+ " min" : 1 ,
246
+ " max" : 5 ,
247
+ " step" : 0.5 ,
248
+ " discrete" : true
249
+ }
250
+ }
251
+ ```
252
+
221
253
222
254
## Wrappers
223
255
@@ -230,6 +262,7 @@ delete-hint attribute value
230
262
- [x] add md-chips
231
263
- [x] add md-datepicker
232
264
- [ ] add md-icon wrapper
265
+ - [x] add md-slider with min, max, step and discrete options
233
266
- [x] add md-select
234
267
- [x] multiple in md-select
235
268
- [ ] add groups to md-select
Original file line number Diff line number Diff line change
1
+ var { SetModule} = angular2now ;
2
+
3
+ SetModule ( 'formlyMaterial' )
4
+ . config ( ( formlyConfigProvider , formlyMaterialProvider ) => {
5
+
6
+ formlyConfigProvider . setType ( {
7
+ name : 'slider' ,
8
+ templateUrl : formlyMaterialProvider . templateUrl ( 'lib/client/types/slider/slider.ng.html' ) ,
9
+ defaultOptions : {
10
+ ngModelAttrs : {
11
+ min : {
12
+ bound : 'min' ,
13
+ attribute : 'min'
14
+ } ,
15
+ max : {
16
+ bound : 'max' ,
17
+ attribute : 'max'
18
+ } ,
19
+ step : {
20
+ bound : 'step' ,
21
+ attribute : 'step'
22
+ } ,
23
+ discrete : {
24
+ bound : 'md-discrete'
25
+ }
26
+ }
27
+ } ,
28
+ apiCheck : ( check ) => ( {
29
+ templateOptions : {
30
+ min : check . number . optional ,
31
+ max : check . number . optional ,
32
+ step : check . number . optional ,
33
+ discrete : check . bool . optional
34
+ }
35
+ } )
36
+ } ) ;
37
+
38
+ } ) ;
Original file line number Diff line number Diff line change
1
+ < md-slider ng-model ="model[options.key] "> </ md-slider >
Original file line number Diff line number Diff line change @@ -92,7 +92,11 @@ Package.onUse(function (api) {
92
92
93
93
// chips
94
94
'lib/client/types/chips/chips.js' ,
95
- 'lib/client/types/chips/chips.ng.html'
95
+ 'lib/client/types/chips/chips.ng.html' ,
96
+
97
+ // slider
98
+ 'lib/client/types/slider/slider.js' ,
99
+ 'lib/client/types/slider/slider.ng.html'
96
100
97
101
] , client ) ;
98
102
You can’t perform that action at this time.
0 commit comments