It is quite common to have a little close button on each tab of a tabset to close a given tab. Unfortunately we can’t easily add such a button today since content of the ngTabTitle
tab is added inside header’s link (<a>
element). This setup limits what users can put in a tab header.
Potential solutions:
- have users provide the whole link as part of the
ngTabTitle
template – the downside here is that users would have to manage theactive
anddisabled
states as well as a selection logic; - add a new directive (
ngTabHeader
) – if provided its content would be added after a link. The downside here is that there might be someone coming and saying that I want to insert sth before a link…
Not sure what is the best course of action here, to be discussed.
This is not valid html, but works fine.
Another solution would be (if nesting templates is possible in ng2):