We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4af65a commit 3bb667eCopy full SHA for 3bb667e
src/lib/input/README.md
@@ -86,7 +86,25 @@ The divider (line under the `<md-input>` content) color can be changed by using
86
87
You can label the `<md-input>` as you would a regular `<input>`.
88
89
+## Focus
90
91
+You can put the focus on an input component using the `focus()` method.
92
+
93
+### Example
94
95
+```html
96
+<md-input #nameInput placeholder="name"></md-input>
97
+```
98
99
+```ts
100
+export class MyComponent implements OnInit {
101
+ @ViewChild('nameInput') nameInput: MdInput;
102
103
+ ngOnInit() {
104
+ this.nameInput.focus();
105
+ }
106
+}
107
108
109
## Full Forms
110
0 commit comments