components icon indicating copy to clipboard operation
components copied to clipboard

Adding/Removing Tabs

Open ajrauen opened this issue 10 years ago • 5 comments

Bug, feature request, or proposal:

Add the ability to create and destroy a tab

ajrauen avatar Sep 23 '16 21:09 ajrauen

@ajrauen Please follow the issue template and add more context to your request. You can already dynamically show and hide tabs with things like ngIf and ngFor; please explain why this wouldn't be enough.

jelbourn avatar Sep 23 '16 22:09 jelbourn

I don't want to show/hide, though I admit that hiding could be "good enough" in place of destroying. I want to be able to add a tab because the tab-content is dynamic. Sometimes it'll be X component, sometimes Y or Z or so on. Or it could be 10 tabs each with component X.

Basically I want the user to be able to click a button and open a new tab based on the button.

ajrauen avatar Sep 23 '16 23:09 ajrauen

Use ngFor over an array and add elements to that array when the user clicks the add tab button.

On Fri, Sep 23, 2016, 20:06 ajrauen [email protected] wrote:

I don't want to show/hide, though I admit that hiding could be "good enough" in place of destroying. I want to be able to add a tab because the tab-content is dynamic. Sometimes it'll be X component, sometimes Y or Z or so on. Or it could be 10 tabs each with component X.

Basically I want the user to be able to click a button and open a new tab based on the button.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/angular/material2/issues/1317#issuecomment-249322350, or mute the thread https://github.com/notifications/unsubscribe-auth/AAASms6o9sTTsqoEmU46E733yT2m351aks5qtFtagaJpZM4KFYy3 .

13k avatar Sep 24 '16 16:09 13k

But that would only add the tab, remember than the tab content is dynamic.

ajrauen avatar Sep 24 '16 18:09 ajrauen

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.