diff --git a/src/components/button/button.ts b/src/components/button/button.ts index 3a0a6fb1c8fe..950d80798e1e 100644 --- a/src/components/button/button.ts +++ b/src/components/button/button.ts @@ -80,6 +80,10 @@ export class MdButton { removeKeyboardFocus() { this.isKeyboardFocused = false; } + + focus() { + this.elementRef.nativeElement.focus(); + } } @Component({ diff --git a/src/demo-app/button/button-demo.html b/src/demo-app/button/button-demo.html index 3b4d4beeffa3..dab30c8c4bca 100644 --- a/src/demo-app/button/button-demo.html +++ b/src/demo-app/button/button-demo.html @@ -63,11 +63,14 @@

isDisabled: {{isDisabled}}, clickCounter: {{clickCounter}}

+ + +
- + - off - + off +