-
Notifications
You must be signed in to change notification settings - Fork 7
/
app.js
122 lines (119 loc) · 3.93 KB
/
app.js
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
(function() {
var app = angular.module("number-input-demo", ['number-input']);
app.controller("AppController", function() {
this.onChangeCount = 0;
this.onChange = function(model) {
this.onChangeCount++;
};
this.inputsConfig = [
[
{
label: "Default",
options: {}
},
{
label: "Custom hint",
options: {
min: 0,
max: 24,
step: 0.25,
hint: "0 to 24 hours",
decimalPlaces: 2
}
}
],
[
{
label: "Decimal places",
options: {
start: 0,
min: -1,
max: 1,
step: 0.0005,
hideHint: false,
disableDecimal: false
}
},
{
label: "From -10 to 10",
options: {
start: 0,
min: -10,
max: 10,
hideHint: true
}
}
],
[
{
label: "50 or lower",
options: {
start: 45,
max: 50
}
},
{
label: "Always positive",
options: {
start: 0,
min: 0
}
}
],
[
{
label: "From 6 to 19",
options: {
start: 6,
min: 6,
max: 19,
hideHint: true
}
},
{
label: "From -6 to -25",
options: {
start: -19,
min: -25,
max: -6,
hideHint: true
}
}
],
[
{
label: "Prefix",
options: {
start: 100.00,
min: 100.00,
prefix: "$",
decimalPlaces: 2,
hideHint: true
}
},
{
label: "Postfix",
options: {
start: 0,
min: 0,
postfix: "lbs.",
hint: "Enter your weight in pounds"
}
}
],
[
{
label: "Prefix and postfix",
options: {
start: 0.00,
min: 0.00,
prefix: "*",
postfix: "%",
disableDecimal: true,
hideHint: true
}
}
]
];
});
})();