Skip to content

docs(button): more detail on MdAnchor #466

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 19, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/components/button/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# md-button

`md-button` is an HTML `<button>` or `<a>` tag enhanced with styling and animation to match the [spec of a Material Design button](https://www.google.com/design/spec/components/buttons.html).
`md-button` is an HTML `<button>` or `<a>` tag enhanced with styling and animation to match the
[Material Design button spec](https://www.google.com/design/spec/components/buttons.html).

Users should employ a button element (`<button>`) when clicking triggers some action in the current
view *without navigating*. An anchor element (`<a>`) should be used when clicking *navigates*
the user to another URL. Depending on which element is used, the component will either be an
instance of `MdButton` or `MdAnchor`. Visually, the two are identical.


### Button types

Expand Down Expand Up @@ -103,4 +110,4 @@ Properties:
| Name | Type | Description |
| --- | --- | --- |
| `color` | `"primary"|"accent"|"warn"` | The color palette of the button
| `disabled` | boolean | Whether or not the button is disabled
| `disabled` | boolean | Whether or not the button is disabled
4 changes: 4 additions & 0 deletions src/components/button/button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
ChangeDetectionStrategy,
ElementRef,
Renderer,
Type,
} from '@angular/core';

// TODO(jelbourn): Ink ripples.
Expand Down Expand Up @@ -132,3 +133,6 @@ export class MdAnchor extends MdButton {
}
}
}


export const MD_BUTTON_DIRECTIVES: Type[] = [MdButton, MdAnchor];