Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lonewolf-73 opened this issue Aug 28, 2021 · 0 comments

Comments

@lonewolf-73
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant