|
2 | 2 | <md-toolbar color="primary">Basic</md-toolbar>
|
3 | 3 | <md-card-content>
|
4 | 4 | <form>
|
5 |
| - <md-input class="demo-full-width" placeholder="Company (disabled)" disabled value="Google"> |
6 |
| - </md-input> |
| 5 | + <input md-input class="demo-full-width" placeholder="Company (disabled)" disabled value="Google"> |
| 6 | + |
| 7 | + <input md-input value="test"> |
7 | 8 |
|
8 | 9 | <table style="width: 100%" cellspacing="0"><tr>
|
9 |
| - <td><md-input placeholder="First name" style="width: 100%"></md-input></td> |
10 |
| - <td><md-input placeholder="Long Last Name That Will Be Truncated" style="width: 100%"></md-input></td> |
| 10 | + <td><input md-input placeholder="First name" style="width: 100%"></td> |
| 11 | + <td><input md-input placeholder="Long Last Name That Will Be Truncated" style="width: 100%"></td> |
11 | 12 | </tr></table>
|
12 | 13 | <p>
|
13 |
| - <md-textarea class="demo-full-width" placeholder="Address" value="1600 Amphitheatre Pkway"></md-textarea> |
14 |
| - <md-textarea class="demo-full-width" placeholder="Address 2"></md-textarea> |
| 14 | + <textarea md-input class="demo-full-width" placeholder="Address" value="1600 Amphitheatre Pkway"></textarea> |
| 15 | + <textarea md-input class="demo-full-width" placeholder="Address 2"></textarea> |
15 | 16 | </p>
|
16 |
| - <table style="width: 100%" cellspacing="0"><tr> |
17 |
| - <td><md-input class="demo-full-width" placeholder="City" value="Mountain View"></md-input></td> |
18 |
| - <td><md-input class="demo-full-width" placeholder="State" maxLength="2" value="CA"></md-input></td> |
19 |
| - <td><md-input #postalCode class="demo-full-width" maxLength="5" |
20 |
| - placeholder="Postal Code" |
21 |
| - value="94043"> |
22 |
| - <md-hint align="end">{{postalCode.characterCount}} / 5</md-hint> |
23 |
| - </md-input></td> |
24 |
| - </tr></table> |
25 | 17 | </form>
|
26 | 18 | </md-card-content>
|
27 | 19 | </md-card>
|
28 | 20 |
|
29 |
| -<md-card class="demo-card demo-basic"> |
30 |
| - <md-toolbar color="primary">Prefix + Suffix</md-toolbar> |
31 |
| - <md-card-content> |
32 |
| - <md-input placeholder="amount" align="end"> |
33 |
| - <span md-prefix>$ </span> |
34 |
| - <span md-suffix>.00</span> |
35 |
| - </md-input> |
36 |
| - </md-card-content> |
37 |
| -</md-card> |
38 |
| - |
39 |
| -<md-card class="demo-card demo-basic"> |
40 |
| - <md-toolbar color="primary">Divider Colors</md-toolbar> |
41 |
| - <md-card-content> |
42 |
| - <h4>Input</h4> |
43 |
| - <md-input dividerColor="primary" placeholder="Default Color" value="example"></md-input> |
44 |
| - <md-input dividerColor="accent" placeholder="Accent Color" value="example"></md-input> |
45 |
| - <md-input dividerColor="warn" placeholder="Warn Color" value="example"></md-input> |
46 |
| - |
47 |
| - <h4>Textarea</h4> |
48 |
| - <md-textarea dividerColor="primary" placeholder="Default Color" value="example"></md-textarea> |
49 |
| - <md-textarea dividerColor="accent" placeholder="Accent Color" value="example"></md-textarea> |
50 |
| - <md-textarea dividerColor="warn" placeholder="Warn Color" value="example"></md-textarea> |
51 |
| - |
52 |
| - </md-card-content> |
53 |
| -</md-card> |
54 |
| - |
55 |
| -<md-card class="demo-card demo-basic"> |
56 |
| - <md-toolbar color="primary">Hints</md-toolbar> |
57 |
| - <md-card-content> |
58 |
| - <h4>Input</h4> |
59 |
| - <p> |
60 |
| - <md-input placeholder="Character count (100 max)" maxLength="100" class="demo-full-width" |
61 |
| - value="Hello world. How are you?" |
62 |
| - #characterCountHintExample> |
63 |
| - <md-hint align="end">{{characterCountHintExample.characterCount}} / 100</md-hint> |
64 |
| - </md-input> |
65 |
| - </p> |
66 |
| - |
67 |
| - <h4>Textarea</h4> |
68 |
| - <p> |
69 |
| - <md-textarea placeholder="Character count (100 max)" maxLength="100" class="demo-full-width" |
70 |
| - value="Hello world. How are you?" |
71 |
| - #characterCountHintExample> |
72 |
| - <md-hint align="end">{{characterCountHintExample.characterCount}} / 100</md-hint> |
73 |
| - </md-textarea> |
74 |
| - </p> |
75 |
| - </md-card-content> |
76 |
| -</md-card> |
77 |
| - |
78 | 21 | <md-card class="demo-card">
|
79 | 22 | <md-card-title>
|
80 |
| - Hello <md-input [(ngModel)]="name" type="text" placeholder="First name"></md-input>, |
| 23 | + Hello <input md-input [(ngModel)]="name" type="text" placeholder="First name">, |
81 | 24 | how are you?
|
82 | 25 | </md-card-title>
|
83 | 26 | <md-card-content>
|
84 | 27 | <p>
|
85 |
| - <md-input disabled placeholder="Disabled field" value="Value"></md-input> |
86 |
| - <md-input required placeholder="Required field"></md-input> |
87 |
| - </p> |
88 |
| - <p> |
89 |
| - <md-input placeholder="100% width placeholder" style="width: 100%"></md-input> |
90 |
| - </p> |
91 |
| - <p> |
92 |
| - <md-input placeholder="Character count (100 max)" maxLength="100" style="width: 100%" |
93 |
| - #input> |
94 |
| - <md-hint align="end">{{input.characterCount}} / 100</md-hint> |
95 |
| - </md-input> |
96 |
| - </p> |
97 |
| - <p> |
98 |
| - <md-input placeholder="Show Hint Label" style="width: 100%" |
99 |
| - hintLabel="Hint label"></md-input> |
| 28 | + <input md-input disabled placeholder="Disabled field" value="Value"> |
| 29 | + <input md-input required placeholder="Required field"> |
100 | 30 | </p>
|
101 | 31 |
|
102 | 32 | <p>
|
103 |
| - <md-input> |
104 |
| - <md-placeholder> |
105 |
| - I <md-icon class="demo-icons">favorite</md-icon> <b>bold</b> placeholder |
106 |
| - </md-placeholder> |
107 |
| - <md-hint> |
108 |
| - I also <md-icon class="demo-icons">home</md-icon> <i>italic</i> hint labels |
109 |
| - </md-hint> |
110 |
| - </md-input> |
111 |
| - </p> |
112 |
| - <p> |
113 |
| - <md-input placeholder="Show Hint Label With Character Count" style="width: 100%" |
114 |
| - hintLabel="Hint label" characterCounter></md-input> |
115 |
| - </p> |
116 |
| - <p> |
117 |
| - <md-checkbox [(ngModel)]="dividerColor">Check to change the divider color:</md-checkbox> |
118 |
| - <md-input [dividerColor]="dividerColor ? 'primary' : 'accent'" |
119 |
| - [placeholder]="dividerColor ? 'Primary color' : 'Accent color'"></md-input> |
120 |
| - </p> |
121 |
| - <p> |
122 |
| - <md-checkbox [(ngModel)]="requiredField"> Check to make required:</md-checkbox> |
123 |
| - <md-input [required]="requiredField" |
124 |
| - [placeholder]="requiredField ? 'Required field' : 'Not required field'"></md-input> |
125 |
| - </p> |
126 |
| - <p> |
127 |
| - <md-checkbox [(ngModel)]="floatingLabel"> Check to make floating label:</md-checkbox> |
128 |
| - <md-input [floatingPlaceholder]="floatingLabel" |
129 |
| - [placeholder]="floatingLabel ? 'Floating label' : 'Not floating label'"></md-input> |
130 |
| - </p> |
| 33 | + <input md-input style="margin: 32px" placeholder="Prefixed" value="example" [mdPrefix]="prefix"> |
| 34 | + <input md-input placeholder="Suffixed" value="123" align="end" [mdSuffix]="suffix"> |
131 | 35 |
|
132 |
| - <p> |
133 |
| - <md-input placeholder="Prefixed" value="example"> |
134 |
| - <div md-prefix>Example: </div> |
135 |
| - </md-input> |
136 |
| - <md-input placeholder="Suffixed" value="123" align="end"> |
137 |
| - <span md-suffix>.00 €</span> |
138 |
| - </md-input> |
| 36 | + <template #prefix><div>Example: </div></template> |
| 37 | + <template #suffix><span>.00 €</span></template> |
| 38 | + <br/> |
| 39 | + |
| 40 | + <input md-input placeholder="Prefixed" value="example" [mdPrefix]="'Example: '"> |
| 41 | + <input md-input placeholder="Suffixed" value="123" align="end" mdSuffix=".00 $"> |
139 | 42 | <br/>
|
| 43 | + |
140 | 44 | Both:
|
141 |
| - <md-input #email placeholder="Email Address" value="angular-core" align="end"> |
142 |
| - <span md-prefix><md-icon [class.primary]="email.focused" class="demo-icons demo-transform">email</md-icon> </span> |
143 |
| - <span md-suffix class="demo-transform" [class.primary]="email.focused"> @gmail.com</span> |
144 |
| - </md-input> |
145 |
| - </p> |
| 45 | + <input md-input #email placeholder="Email Address" value="angular-core" align="end" [mdPrefix]="bothPrefix" [mdSuffix]="bothSuffix"> |
146 | 46 |
|
147 |
| - <p> |
148 |
| - Empty: <md-input></md-input> |
149 |
| - <label>Label: <md-input></md-input></label> |
| 47 | + <template #bothPrefix><span><md-icon [class.primary]="email.focused" class="demo-icons demo-transform">email</md-icon> </span></template> |
| 48 | + <template #bothSuffix><span class="demo-transform" [class.primary]="email.focused"> @gmail.com</span></template> |
150 | 49 | </p>
|
151 | 50 | </md-card-content>
|
152 | 51 | </md-card>
|
153 |
| - |
154 |
| -<md-card class="demo-card"> |
155 |
| - <table width="100%"> |
156 |
| - <thead> |
157 |
| - <td>Table</td> |
158 |
| - <td colspan="3"> |
159 |
| - <button (click)="addABunch(5)">Add 5</button> |
160 |
| - <button (click)="addABunch(10)">Add 10</button> |
161 |
| - <button (click)="addABunch(100)">Add 100</button> |
162 |
| - <button (click)="addABunch(1000)">Add 1000</button> |
163 |
| - </td> |
164 |
| - </thead> |
165 |
| - <tr *ngFor="let item of items; let i = index"> |
166 |
| - <td>{{i+1}}</td> |
167 |
| - <td> |
168 |
| - <md-input type="number" placeholder="value" aria-label="hello" [(ngModel)]="items[i].value"></md-input> |
169 |
| - </td> |
170 |
| - <td> |
171 |
| - <input type="number" [(ngModel)]="items[i].value"> |
172 |
| - </td> |
173 |
| - <td>{{item.value}}</td> |
174 |
| - </tr> |
175 |
| - </table> |
176 |
| -</md-card> |
0 commit comments