mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
docs(button): more detail on MdAnchor. (#466)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -6,6 +6,7 @@ import {
|
||||
ChangeDetectionStrategy,
|
||||
ElementRef,
|
||||
Renderer,
|
||||
Type,
|
||||
} from '@angular/core';
|
||||
|
||||
// TODO(jelbourn): Ink ripples.
|
||||
@@ -132,3 +133,6 @@ export class MdAnchor extends MdButton {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export const MD_BUTTON_DIRECTIVES: Type[] = [MdButton, MdAnchor];
|
||||
|
||||
Reference in New Issue
Block a user