Skip to content

Having two supertabs pages, how to go from first page to second page programmatically? #470

@lonewolf-73

Description

@lonewolf-73

Hello everyone!

As I see in the documentation, there's active-tab-index property and so I tried to set in my service a property to set current active tab when I do a click on an item in first tab's page.... so I did:

<super-tabs tabsPlacement="top" [activeTabIndex]=myService.selectedTabIndex>...</super-tabs>

so when I am inside first tab's page, page1.page.ts and I want to go automatically to second page so I set:

function callSecondPage() {
    this.myService.selectedTabIndex = 1;
}

so in this way in the html of home page it should set automatically the property and go on second page but it doesn't work.
I tried also to call:

this.router.navigate(['/secondpage']);

with a Router but it shows the second page on entire screen, not the same as changing just tab page..... so how I can change tab page programmatically in the correct way?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions