Skip to content

[Tabs] Allow users to assign IDs to tabs #4136

Closed
@jefersonestevo

Description

@jefersonestevo

Bug, feature request, or proposal:

proposal

What is the expected behavior?

Let the user define some "id" for the tab, to identify, outside the tab container, which tab is currently selected. Please note that this id may not necessarily be a substitute to the "selectedIndex" property, but some aditional content to identify which tab is currently selected.

What is the current behavior?

Today we can only know which tab is selected using the selectedIndex of md-tab-group, which is not really safe as the content of the tab may be changed and the index changes within it

What are the steps to reproduce?

Plunker

What is the use-case or motivation for changing an existing behavior?

This is linked to #4135. The "workaround" that I found to use a "fixed" content relative to the current selected tab is to render the fixed element outside the tab-group and use the selectedIndex to show it.

Which versions of Angular, Material, OS, browsers are affected?

2.0.0-beta.3

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/tabsfeatureThis issue represents a new feature or feature request rather than a bug or bug fix

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions