This repository was archived by the owner on Sep 5, 2024. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork 3.4k
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
md-tabs can't be used for page navigation #6676
Copy link
Copy link
Closed
Labels
P3: importantImportant issues that really should be fixed when possible.Important issues that really should be fixed when possible.g3: reportedThe issue was reported by an internal or external product team.The issue was reported by an internal or external product team.has: Pull RequestA PR has been created to address this issueA PR has been created to address this issue
Milestone
Description
The tab component does not work well as top-navigation (header links, with no md-tab-body). The root of the problem is that md-tabs fires a synthetic click event on init, which causes an infinite redirect loop if clicking on a tab causes a page navigation (which re-initializes the tabs which causes a click which triggers a page navigation...).
tab init triggers the select() function:
| ctrl.tabs[ ctrl.selectedIndex ] && ctrl.tabs[ ctrl.selectedIndex ].scope.select(); |
select() triggers a click:
| ctrl.tabs[ index ].element.triggerHandler('click'); |
Metadata
Metadata
Assignees
Labels
P3: importantImportant issues that really should be fixed when possible.Important issues that really should be fixed when possible.g3: reportedThe issue was reported by an internal or external product team.The issue was reported by an internal or external product team.has: Pull RequestA PR has been created to address this issueA PR has been created to address this issue