3
3
< md-card-content >
4
4
< form >
5
5
< md-input-wrapper class ="demo-full-width ">
6
- < input placeholder ="Company (disabled) " disabled value ="Google ">
6
+ < input md-input placeholder ="Company (disabled) " disabled value ="Google ">
7
7
</ md-input-wrapper >
8
8
9
9
< table style ="width: 100% " cellspacing ="0 "> < tr >
10
10
< td >
11
11
< md-input-wrapper style ="width: 100% ">
12
- < input placeholder ="First name ">
12
+ < input md-input placeholder ="First name ">
13
13
</ md-input-wrapper >
14
14
</ td >
15
15
< td >
16
16
< md-input-wrapper style ="width: 100% ">
17
- < input placeholder ="Long Last Name That Will Be Truncated ">
17
+ < input md-input placeholder ="Long Last Name That Will Be Truncated ">
18
18
</ md-input-wrapper >
19
19
</ td >
20
20
</ tr > </ table >
21
21
< p >
22
22
< md-input-wrapper class ="demo-full-width ">
23
- < textarea placeholder ="Address "> 1600 Amphitheatre Pkway</ textarea >
23
+ < textarea md-input placeholder ="Address "> 1600 Amphitheatre Pkway</ textarea >
24
24
</ md-input-wrapper >
25
25
< md-input-wrapper class ="demo-full-width ">
26
- < textarea placeholder ="Address 2 "> </ textarea >
26
+ < textarea md-input placeholder ="Address 2 "> </ textarea >
27
27
</ md-input-wrapper >
28
28
</ p >
29
29
< table style ="width: 100% " cellspacing ="0 "> < tr >
30
30
< td >
31
31
< md-input-wrapper class ="demo-full-width ">
32
- < input placeholder ="City " value ="Mountain View ">
32
+ < input md-input placeholder ="City " value ="Mountain View ">
33
33
</ md-input-wrapper >
34
34
</ td >
35
35
< td >
36
36
< md-input-wrapper class ="demo-full-width ">
37
- < input placeholder ="State " maxLength ="2 " value ="CA ">
37
+ < input md-input placeholder ="State " maxLength ="2 " value ="CA ">
38
38
</ md-input-wrapper >
39
39
</ td >
40
40
< td >
41
41
< md-input-wrapper class ="demo-full-width ">
42
- < input #postalCode maxLength ="5 " placeholder ="Postal Code " value ="94043 ">
42
+ < input md-input #postalCode maxLength ="5 " placeholder ="Postal Code " value ="94043 ">
43
43
< md-hint align ="end "> {{postalCode.value.length}} / 5</ md-hint >
44
44
</ md-input-wrapper >
45
45
</ td >
52
52
< md-toolbar color ="primary "> Prefix + Suffix</ md-toolbar >
53
53
< md-card-content >
54
54
< md-input-wrapper align ="end ">
55
- < input placeholder ="amount ">
55
+ < input md-input placeholder ="amount ">
56
56
< span md-prefix > $ </ span >
57
57
< span md-suffix > .00</ span >
58
58
</ md-input-wrapper >
64
64
< md-card-content >
65
65
< h4 > Input</ h4 >
66
66
< md-input-wrapper dividerColor ="primary " >
67
- < input placeholder ="Default Color " value ="example ">
67
+ < input md-input placeholder ="Default Color " value ="example ">
68
68
</ md-input-wrapper >
69
69
< md-input-wrapper dividerColor ="accent ">
70
- < input placeholder ="Accent Color " value ="example ">
70
+ < input md-input placeholder ="Accent Color " value ="example ">
71
71
</ md-input-wrapper >
72
72
< md-input-wrapper dividerColor ="warn ">
73
- < input placeholder ="Warn Color " value ="example ">
73
+ < input md-input placeholder ="Warn Color " value ="example ">
74
74
</ md-input-wrapper >
75
75
76
76
< h4 > Textarea</ h4 >
77
77
< md-input-wrapper dividerColor ="primary ">
78
- < textarea placeholder ="Default Color "> example</ textarea >
78
+ < textarea md-input placeholder ="Default Color "> example</ textarea >
79
79
</ md-input-wrapper >
80
80
< md-input-wrapper dividerColor ="accent ">
81
- < textarea placeholder ="Accent Color "> example</ textarea >
81
+ < textarea md-input placeholder ="Accent Color "> example</ textarea >
82
82
</ md-input-wrapper >
83
83
< md-input-wrapper dividerColor ="warn ">
84
- < textarea placeholder ="Warn Color "> example</ textarea >
84
+ < textarea md-input placeholder ="Warn Color "> example</ textarea >
85
85
</ md-input-wrapper >
86
86
</ md-card-content >
87
87
</ md-card >
@@ -92,7 +92,8 @@ <h4>Textarea</h4>
92
92
< h4 > Input</ h4 >
93
93
< p >
94
94
< md-input-wrapper class ="demo-full-width ">
95
- < input #characterCountInputHintExample
95
+ < input md-input
96
+ #characterCountInputHintExample
96
97
placeholder ="Character count (100 max) "
97
98
maxLength ="100 "
98
99
value ="Hello world. How are you? ">
@@ -103,7 +104,8 @@ <h4>Input</h4>
103
104
< h4 > Textarea</ h4 >
104
105
< p >
105
106
< md-input-wrapper class ="demo-full-width ">
106
- < textarea #characterCountTextareaHintExample
107
+ < textarea md-input
108
+ #characterCountTextareaHintExample
107
109
placeholder ="Character count (100 max) "
108
110
maxLength ="100 "> Hello world. How are you?</ textarea >
109
111
< md-hint align ="end "> {{characterCountTextareaHintExample.value.length}} / 100</ md-hint >
@@ -116,39 +118,39 @@ <h4>Textarea</h4>
116
118
< md-toolbar color ="primary ">
117
119
Hello
118
120
< md-input-wrapper dividerColor ="accent ">
119
- < input [(ngModel)] ="name " type ="text " placeholder ="First name ">
121
+ < input md-input [(ngModel)] ="name " type ="text " placeholder ="First name ">
120
122
</ md-input-wrapper > ,
121
123
how are you?
122
124
</ md-toolbar >
123
125
< md-card-content >
124
126
< p >
125
127
< md-input-wrapper >
126
- < input disabled placeholder ="Disabled field " value ="Value ">
128
+ < input md-input disabled placeholder ="Disabled field " value ="Value ">
127
129
</ md-input-wrapper >
128
130
< md-input-wrapper >
129
- < input required placeholder ="Required field ">
131
+ < input md-input required placeholder ="Required field ">
130
132
</ md-input-wrapper >
131
133
</ p >
132
134
< p >
133
135
< md-input-wrapper style ="width: 100% ">
134
- < input placeholder ="100% width placeholder ">
136
+ < input md-input placeholder ="100% width placeholder ">
135
137
</ md-input-wrapper >
136
138
</ p >
137
139
< p >
138
140
< md-input-wrapper style ="width: 100% ">
139
- < input #input placeholder ="Character count (100 max) " maxLength ="100 ">
141
+ < input md-input #input placeholder ="Character count (100 max) " maxLength ="100 ">
140
142
< md-hint align ="end "> {{input.value.length}} / 100</ md-hint >
141
143
</ md-input-wrapper >
142
144
</ p >
143
145
< p >
144
146
< md-input-wrapper hintLabel ="Hint label " style ="width: 100% ">
145
- < input placeholder ="Show Hint Label ">
147
+ < input md-input placeholder ="Show Hint Label ">
146
148
</ md-input-wrapper >
147
149
</ p >
148
150
149
151
< p >
150
152
< md-input-wrapper >
151
- < input >
153
+ < input md-input >
152
154
< md-placeholder >
153
155
I < md-icon class ="demo-icons "> favorite</ md-icon > < b > bold</ b > placeholder
154
156
</ md-placeholder >
@@ -159,43 +161,44 @@ <h4>Textarea</h4>
159
161
</ p >
160
162
< p >
161
163
< md-input-wrapper hintLabel ="Hint label " style ="width: 100% ">
162
- < input #hintLabelWithCharCount placeholder ="Show Hint Label With Character Count ">
164
+ < input md-input #hintLabelWithCharCount placeholder ="Show Hint Label With Character Count ">
163
165
< md-hint align ="end "> {{hintLabelWithCharCount.value.length}}</ md-hint >
164
166
</ md-input-wrapper >
165
167
</ p >
166
168
< p >
167
169
< md-checkbox [(ngModel)] ="dividerColor "> Check to change the divider color:</ md-checkbox >
168
170
< md-input-wrapper [dividerColor] ="dividerColor ? 'primary' : 'accent' ">
169
- < input [placeholder] ="dividerColor ? 'Primary color' : 'Accent color' ">
171
+ < input md-input [placeholder] ="dividerColor ? 'Primary color' : 'Accent color' ">
170
172
</ md-input-wrapper >
171
173
</ p >
172
174
< p >
173
175
< md-checkbox [(ngModel)] ="requiredField "> Check to make required:</ md-checkbox >
174
176
< md-input-wrapper >
175
- < input [required] ="requiredField "
177
+ < input md-input
178
+ [required] ="requiredField "
176
179
[placeholder] ="requiredField ? 'Required field' : 'Not required field' ">
177
180
</ md-input-wrapper >
178
181
</ p >
179
182
< p >
180
183
< md-checkbox [(ngModel)] ="floatingLabel "> Check to make floating label:</ md-checkbox >
181
184
< md-input-wrapper [floatingPlaceholder] ="floatingLabel ">
182
- < input [placeholder] ="floatingLabel ? 'Floating label' : 'Not floating label' ">
185
+ < input md-input [placeholder] ="floatingLabel ? 'Floating label' : 'Not floating label' ">
183
186
</ md-input-wrapper >
184
187
</ p >
185
188
186
189
< p >
187
190
< md-input-wrapper >
188
- < input placeholder ="Prefixed " value ="example ">
191
+ < input md-input placeholder ="Prefixed " value ="example ">
189
192
< div md-prefix > Example: </ div >
190
193
</ md-input-wrapper >
191
194
< md-input-wrapper align ="end ">
192
- < input placeholder ="Suffixed " value ="123 ">
195
+ < input md-input placeholder ="Suffixed " value ="123 ">
193
196
< span md-suffix > .00 €</ span >
194
197
</ md-input-wrapper >
195
198
< br />
196
199
Both:
197
200
< md-input-wrapper align ="end ">
198
- < input #email placeholder ="Email Address " value ="angular-core ">
201
+ < input md-input #email placeholder ="Email Address " value ="angular-core ">
199
202
< span md-prefix >
200
203
< md-icon [class.primary] ="email.focused " class ="demo-icons demo-transform "> email</ md-icon >
201
204
@@ -207,8 +210,8 @@ <h4>Textarea</h4>
207
210
</ p >
208
211
209
212
< p >
210
- Empty: < md-input-wrapper > < input > </ md-input-wrapper >
211
- < label > Label: < md-input-wrapper > < input > </ md-input-wrapper > </ label >
213
+ Empty: < md-input-wrapper > < input md-input > </ md-input-wrapper >
214
+ < label > Label: < md-input-wrapper > < input md-input > </ md-input-wrapper > </ label >
212
215
</ p >
213
216
</ md-card-content >
214
217
</ md-card >
@@ -230,7 +233,8 @@ <h4>Textarea</h4>
230
233
< td > {{i+1}}</ td >
231
234
< td >
232
235
< md-input-wrapper >
233
- < input type ="number "
236
+ < input md-input
237
+ type ="number "
234
238
placeholder ="value "
235
239
aria-label ="hello "
236
240
[(ngModel)] ="items[i].value ">
@@ -251,8 +255,10 @@ <h4>Textarea</h4>
251
255
< md-card-content >
252
256
< textarea md-autosize class ="demo-textarea "> </ textarea >
253
257
< div >
254
- < md-input-wrapper style ="width:300px; ">
255
- < textarea placeholder ="Autosized textarea (currently broken) " md-autoresize > </ textarea >
258
+ < md-input-wrapper >
259
+ < textarea md-input
260
+ md-autosize
261
+ placeholder ="Autosized textarea "> </ textarea >
256
262
</ md-input-wrapper >
257
263
</ div >
258
264
</ md-card-content >
0 commit comments