|
19 | 19 | <h1>AngularJS Color Picker</h1> |
20 | 20 | <p>An AngularJS directive for a color picker. No requirement on jQuery.</p> |
21 | 21 | <form class="col-sm-12"> |
22 | | - <div class="row"> |
23 | | - <label class="control-label">Disabled (disabled)</label> |
24 | | - <select ng-model="disabled" class="form-control" ng-options="option.value as option.label for option in boolOptions"></select> |
25 | | - </div> |
26 | | - |
27 | | - <div class="row"> |
28 | | - <label class="control-label">Format (format)</label> |
29 | | - <select ng-model="format" class="form-control" ng-options="option.value as option.label for option in formatOptions"></select> |
30 | | - </div> |
31 | | - |
32 | | - <div class="row"> |
33 | | - <label class="control-label">Alpha (alpha) - whether or not to display the alpha control</label> |
34 | | - <select ng-model="alpha" class="form-control" ng-options="option.value as option.label for option in boolOptions"></select> |
35 | | - </div> |
36 | | - |
37 | | - <div class="row"> |
38 | | - <label class="control-label">Swatch (swatch) - whether or not to display the swatch inside the input field</label> |
39 | | - <select ng-model="swatch" class="form-control" ng-options="option.value as option.label for option in boolOptions"></select> |
40 | | - </div> |
41 | | - |
42 | | - <div class="row"> |
43 | | - <label class="control-label">Swatch Only (swatch-only) - whether or not to display the input field</label> |
44 | | - <select ng-model="swatchOnly" class="form-control" ng-options="option.value as option.label for option in boolOptions"></select> |
45 | | - </div> |
46 | | - |
47 | | - <div class="row"> |
48 | | - <label class="control-label">Swatch Position (swatch-pos) - the position of the swatch in the input field - 'left' or 'right'</label> |
49 | | - <select ng-model="swatchPos" class="form-control" ng-options="option.value as option.label for option in swatchPosOptions"></select> |
50 | | - </div> |
51 | | - |
52 | | - <div class="row"> |
53 | | - <label class="control-label">Swatch Bootstrap Add On (swatch-bootstrap) - whether or not the swatch should appear as a bootstrap add on</label> |
54 | | - <select ng-model="swatchBootstrap" class="form-control" ng-options="option.value as option.label for option in boolOptions"></select> |
55 | | - </div> |
56 | | - |
57 | | - <div class="row"> |
58 | | - <label class="control-label">Position (pos) - the position of the picker control in relation to the input field - 'bottom left', 'bottom right', 'top left', 'top right'</label> |
59 | | - <select ng-model="pos" class="form-control" ng-options="option.value as option.label for option in posOptions"></select> |
60 | | - </div> |
61 | | - |
62 | | - <div class="row"> |
63 | | - <label class="control-label">Case (case) - The case of hex colors - 'upper', 'lower'</label> |
64 | | - <select ng-model="case" class="form-control" ng-options="option.value as option.label for option in caseOptions"></select> |
65 | | - </div> |
66 | | - |
67 | | - <div class="row"> |
68 | | - <label class="control-label">Inline (inline) - whether or not to display inline or in a popup - false, true</label> |
69 | | - <select ng-model="inline" class="form-control" ng-options="option.value as option.label for option in boolOptions"></select> |
70 | | - </div> |
71 | 22 |
|
72 | 23 | <div class="row"> |
73 | 24 | <label class="control-label">Color</label> |
74 | 25 | <color-picker |
75 | 26 | ng-model="color" |
76 | | - color-picker-disabled="disabled" |
77 | | - color-picker-format="format" |
78 | | - color-picker-alpha="alpha" |
79 | | - color-picker-swatch="swatch" |
80 | | - color-picker-swatch-pos="swatchPos" |
81 | | - color-picker-swatch-bootstrap="swatchBootstrap" |
82 | | - color-picker-pos="pos" |
83 | | - color-picker-case="case" |
84 | | - color-picker-swatch-only="swatchOnly" |
85 | | - color-picker-inline="inline" |
86 | | - color-picker-on-change="onColorChange($event, color)" |
| 27 | + color-picker-format="'hex'" |
| 28 | + color-picker-swatch-only="false" |
| 29 | + color-picker-alpha="false" |
| 30 | + color-picker-swatch-bootstrap="false" |
87 | 31 | ></color-picker> |
88 | 32 | </div> |
89 | | - |
90 | | - <div class="row"> |
91 | | - Two Way Binding |
92 | | - <!-- <color-picker ng-model="color"></color-picker> --> |
93 | | - {{color}} |
94 | | - </div> |
95 | | - |
96 | | - <div class="row"> |
97 | | - <h2>No Options</h2> |
98 | | - <label class="control-label">Color</label> |
99 | | - <color-picker ng-model="color2"></color-picker> |
100 | | - </div> |
101 | | - |
102 | | - <div class="row"> |
103 | | - Two Way Binding |
104 | | - {{color2}} |
105 | | - </div> |
106 | 33 | </form> |
107 | 34 | </div> |
108 | 35 | </body> |
|
0 commit comments