I read a lot of problems on the Github ui-router page and I decided to get some input (try another tab example)
I am creating a tab based interface (based on angular -ui).
I have some fixed tabs (some lists) that should be there all the time, data is more or less static and speed is more important.
Additionally, I want to open tabs that are closed, which contain, for example, detailed representations of list items, it is important to be able to switch between them (look for materials on other tabs). They must save the change.
For this reason, I created a tab service that provides fixed tabs and the ability to create or delete them (saving only the ui state)
I created a TabController to manage the entire bookmark, and I created one state that loads the tabs.
So far, so good, works up to this point. Now I want to create routes in the ui state, for example, to show the second tab active, and not the first when you load the page or directly show the tab to create new material.
I donβt want to save a whole state if I reload the page, only show the specific tab directly, and if not, create it. If I'm already on the page, I want to keep the current tabs and open only a new one.
I liked the problem https://github.com/angular-ui/ui-router/issues/562 , because it seemed to me that this could be usecase. I want to save the view as it just modifies it based on the route.
Basically the question is how to properly delegate routes to my TabController, where I can handle it all (find if the tab is present, then show it, otherwise create it and show it).
This problem is complex and it's already late, but maybe you get an idea