mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
docs(tabs): remove invalid property in documentation (#1140)
* docs(tabs): remove invalid property in documentation * The `focusIndex` has been removed, and was actually the same as the `selectedIndex` from the description as well. * Also added a quick example for the `selectedIndex` * Update small note Fixes #1134
This commit is contained in:
+21
-12
@@ -1,6 +1,20 @@
|
||||
# MdTabGroup
|
||||
Tab groups allow the user to organize their content by labels such that only one tab is visible at any given time.
|
||||
|
||||
## `<md-tab-group>`
|
||||
### Properties
|
||||
|
||||
| Name | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| `selectedIndex` | `number` | The index of the currently active tab. |
|
||||
|
||||
### Events
|
||||
|
||||
| Name | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| `focusChange` | `Event` | Fired when focus changes from one label to another |
|
||||
| `selectChange` | `Event` | Fired when the selected tab changes |
|
||||
|
||||
### Examples
|
||||
A basic tab group would have the following markup.
|
||||
```html
|
||||
@@ -22,17 +36,12 @@ A basic tab group would have the following markup.
|
||||
</md-tab-group>
|
||||
```
|
||||
|
||||
## `<md-tab-group>`
|
||||
### Properties
|
||||
It is also possible to specifiy the active tab by using the `selectedIndex` property.
|
||||
|
||||
| Name | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| `selectedIndex` | `number` | The index of the currently active tab. |
|
||||
| `focusIndex` | `number` | The index of the currently active tab. |
|
||||
```html
|
||||
<md-tab-group [selectedIndex]="1">
|
||||
...
|
||||
</md-tab-group>
|
||||
```
|
||||
|
||||
### Events
|
||||
|
||||
| Name | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| `focusChange` | `Event` | Fired when focus changes from one label to another |
|
||||
| `selectChange` | `Event` | Fired when the selected tab changes |
|
||||
**Note**: The index always starts counting from `zero`.
|
||||
|
||||
Reference in New Issue
Block a user