1
1
< div ng-controller ="BasicDemoCtrl as ctrl " layout ="column " ng-cloak >
2
2
3
3
< md-content class ="md-padding " layout ="column ">
4
- < h2 class ="md-title "> Use a custom chip template.</ h2 >
5
-
4
+ < h2 class ="md-title "> Use the default chip template.</ h2 >
5
+ < md-chips ng-model ="ctrl.fruitNames " readonly ="ctrl.readonly " md-removable ="ctrl.removable ">
6
+ </ md-chips >
7
+ < br />
8
+ < h2 class ="md-title "> Use ng-change and add-on-blur</ h2 >
9
+ < md-chips ng-model ="ctrl.ngChangeFruitNames " md-add-on-blur ="true " readonly ="ctrl.readonly "
10
+ ng-change ="ctrl.onModelChange(ctrl.ngChangeFruitNames) " input-aria-label ="Fruit names "
11
+ md-removable ="ctrl.removable "> </ md-chips >
12
+ < br />
13
+ < h2 class ="md-title "> Make chips editable.</ h2 >
14
+ < md-chips ng-model ="ctrl.editableFruitNames " readonly ="ctrl.readonly "
15
+ md-removable ="ctrl.removable " md-enable-chip-edit ="true "
16
+ input-aria-label ="Fruit names "> </ md-chips >
17
+ < br />
18
+ < h2 class ="md-title "> Use a custom chip template with max chips.</ h2 >
6
19
< form name ="fruitForm ">
7
20
< md-chips ng-model ="ctrl.roFruitNames " name ="fruitName " readonly ="ctrl.readonly "
8
- md-removable ="ctrl.removable " md-max-chips ="5 " placeholder ="Enter a fruit... "
21
+ md-removable ="ctrl.removable " md-max-chips ="5 " placeholder ="Ex. Peach "
9
22
input-aria-label ="Fruit names ">
10
23
< md-chip-template >
11
24
< strong > {{$chip}}</ strong >
@@ -17,30 +30,14 @@ <h2 class="md-title">Use a custom chip template.</h2>
17
30
< div ng-message ="md-max-chips "> Maximum number of chips reached.</ div >
18
31
</ div >
19
32
</ form >
20
-
21
33
< br />
22
- < h2 class ="md-title "> Use the default chip template.</ h2 >
23
-
24
- < md-chips ng-model ="ctrl.fruitNames " readonly ="ctrl.readonly " md-removable ="ctrl.removable ">
34
+ < h2 class ="md-title "> Use a long placeholder with md-input-class.</ h2 >
35
+ < md-chips ng-model ="ctrl.fruitNames " readonly ="ctrl.readonly " md-removable ="ctrl.removable "
36
+ placeholder ="Ex. Peach, Kiwi, Watermelon, Passion Fruit, Nectarine, etc. "
37
+ md-input-class ="demo-long-fruit-input ">
25
38
</ md-chips >
26
-
27
- < br />
28
- < h2 class ="md-title "> Use ng-change and add-on-blur</ h2 >
29
-
30
- < md-chips ng-model ="ctrl.ngChangeFruitNames " md-add-on-blur ="true " readonly ="ctrl.readonly "
31
- ng-change ="ctrl.onModelChange(ctrl.ngChangeFruitNames) " input-aria-label ="Fruit names "
32
- md-removable ="ctrl.removable "> </ md-chips >
33
-
34
- < br />
35
- < h2 class ="md-title "> Make chips editable.</ h2 >
36
-
37
- < md-chips ng-model ="ctrl.editableFruitNames " readonly ="ctrl.readonly "
38
- md-removable ="ctrl.removable " md-enable-chip-edit ="true "
39
- input-aria-label ="Fruit names "> </ md-chips >
40
-
41
39
< br />
42
40
< h2 class ="md-title "> Use Placeholders and override hint texts.</ h2 >
43
-
44
41
< md-chips
45
42
ng-model ="ctrl.tags "
46
43
readonly ="ctrl.readonly "
@@ -55,7 +52,6 @@ <h2 class="md-title">Use Placeholders and override hint texts.</h2>
55
52
container-hint ="Chips container. Press the right and left arrow keys to change tag selection. "
56
53
container-empty-hint ="Chips container. Enter the text area, start typing, and then press enter when done to add a tag. ">
57
54
</ md-chips >
58
-
59
55
< br />
60
56
< h2 class ="md-title "> Display an ordered set of objects as chips (with custom template).</ h2 >
61
57
< p > Note: the variables < code > $chip</ code > and < code > $index</ code > are available in custom chip templates.</ p >
0 commit comments