Allow component routing for NgbTabset

Bug description:

I’d like to load different components using the tab set. These components should be accessed by their URL.
Currently, I see two ways of achieving this:

  1. Provide a link with a routerLink in the ngbTabTitle template
  2. Use the tabChange event and tell the router to navigate.

Option 1 has the drawback that routing only happens if the title is clicked (not the tab)

Option 2 doesn’t allow for copying the link when hovering it

While both options may achieve the desired result, I think there should be a better way (e.g., without adding an empty ngbTabContent template).

Link to minimally-working plunker that reproduces the issue:

See links provided for Option 1 and 2.

Version of Angular, ng-bootstrap, and Bootstrap:

Angular: 4.x

ng-bootstrap: 1.0.0-alpha.26

Bootstrap: v4.0.0-alpha.6

1 possible answer(s) on “Allow component routing for NgbTabset