Skip to content
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

md-tabs should emit changes when focus/select changes #569

Closed
DennisSmolek opened this issue May 28, 2016 · 3 comments · Fixed by #649
Closed

md-tabs should emit changes when focus/select changes #569

DennisSmolek opened this issue May 28, 2016 · 3 comments · Fixed by #649
Labels
feature This issue represents a new feature or feature request rather than a bug or bug fix
Milestone

Comments

@DennisSmolek
Copy link

DennisSmolek commented May 28, 2016

Feature:

In the current tabs component there is the function set focusIndex(value: number) that would be easy to tap into for an EventEmitter.

Simply adding an @Output of say focusChanged would allow other components/services to listen to when the tabs changed.

This would mean you could fire a location.go() or mySpecialLogger() whenever the user navigates..

@jelbourn jelbourn added the feature This issue represents a new feature or feature request rather than a bug or bug fix label May 31, 2016
@jelbourn jelbourn added this to the alpha.6 milestone May 31, 2016
@jelbourn
Copy link
Member

@DennisSmolek we are going to have a separate component just for using tabs to change the route (see #524), but there should also be events for changing tabs.

@davidanaya
Copy link

davidanaya commented Nov 20, 2016

Hi!

What about the other way around? I have an md-tab-group with <a [routerLink]...> in every md-tab which works fine and loads properly in a <router-outlet> in the same component, but I can also navigate to this tabs (router.navigate) when clicking in elements in a list, and that should also update the selected panel

Is there any obvious way to achieve this? I could update the [selectedIndex] every time I navigate but that doesn´t look very good. I thought about emiting an event myself (selectChange) but not sure this is feasible either.

Thanks!

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature This issue represents a new feature or feature request rather than a bug or bug fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants