Skip to content
This repository was archived by the owner on Sep 20, 2020. It is now read-only.
This repository was archived by the owner on Sep 20, 2020. It is now read-only.

How to switch to a child state without losing hidden params? #370

Description

@cbranca

Hello, I have a page with two tabs and I need to save the state with Sticky State and DeepStateRedirect. So, when I switch tabs, I expect to get the same state when I go back.

In the tabs i have this:
tab1: ui-sref="admin.config.panel.customer"
tab2: ui-sref="admin.activity"

My app has these states:
page (deepStateRedirect: { default: 'page.config', params: true })
page.config (deepStateRedirect: { default: 'page.config.panel', params: true })
page.config.panel (deepStateRedirect: { default: 'page.config.panel.customer', params: true })
page.config.panel.customer
page.config.panel.edit
page.activity

The default state of tab1 is page.config.panel.customer with params null, but if i select a customer from the tree inside page.config i can go to page.config.panel.customer or page.config.panel.edit passing hidden parameters (example: customerId and userId).
The problem is that if I am in page.config.panel.customer or page.config.panel.edit, and i go to tab 2, and then I go back to tab 1, it returns me to admin.config.panel.customer with params null, but I want go back to page.config.panel.customer or page.config.panel.edit state with the params that I passed.

If i put ui-sref="admin.config" in the tab1 it gives me "Error: Transition prevented".
So I really can't figure out how to solve this. Any help?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions