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

Parallel state handling #475

Closed
mateusleon opened this issue Sep 30, 2013 · 8 comments
Closed

Parallel state handling #475

mateusleon opened this issue Sep 30, 2013 · 8 comments

Comments

@mateusleon
Copy link

Sorry to disturb this issue list with this question but I really don't have a clue about it.

It's possible to set the ui-router to change one view without changing any other, without the need to declare them?

For example: when navigating on the app, some actions are pointed to one view: the view A. However, the user can click on one link that is pointed to other view in the application: the view B. What I need is change the view B letting the view A on the same state that the user choosed before clicking on the link that changes the view B.

It's like working with and Frame-Based app, because any frame is navigable independently, however it's possible to exchange info between them.

If isn't possible to do that on the current release I suggest this implementation, because is realy handy and provides the ability to create dynamic states independently.

Here's the Plunkr with a close behavior: http://plnkr.co/edit/wJXx9R.

@joshmatz
Copy link

joshmatz commented Oct 2, 2013

I'll second this question. I think this would be incredibly useful.

As another example, I'll describe the problem I'm working on:

There's the page you're currently on (the root view).
There's a number of filters that can be used to narrow the results (nested view).
There's the results area (nested view).

The filters are rather complicated, so each category of filter I intended to be a separate template that gets loaded into the filter view. However, I don't want these to interfere or reload the results section.

The results section also has multiple views associated with it that I don't want to interfere with the filter section.

Now that I've typed that out, maybe managing that with UI-Router isn't the best route, but I still think the idea would be very useful. (Note, I think this is similar to this issue: #384 )

@nateabele
Copy link
Contributor

This isn't currently possible, but the next version will provide the ability to manipulate views independently of states, which should allow you an approximation of what you're looking for.

@joshmatz
Copy link

joshmatz commented Oct 2, 2013

Excellent! Thanks for the reply on this.

@zdennis
Copy link

zdennis commented Oct 2, 2013

@nateabele, I see the branch you've started work on. Is that useable at this point?

@nateabele
Copy link
Contributor

@zdennis I'm honestly not sure. I started coding it against an app, but have been refactoring to pass tests. Take a crack at it.

@mateusleon
Copy link
Author

Thanks for the reply, I was struggling with this. On the app that I'm working on, I separated the views and applied the state handling to the main view.

This will be really useful to build even more complex app systems.

@deedubs
Copy link

deedubs commented Oct 30, 2013

We are also experiencing this issue but using a named view for a modal handler. It is very important for us to be able to specify a single named view to change.

In the same way, it would be very nice to be able to ask to change a single view, and set the others if they are uninitialized.

Scenario being if you hit #/login from deep within the page it opens view c without effecting view a or b. If you hit #/login directly it will populate view a and b with a default state, f.e. the home page.

@eddiemonge
Copy link
Contributor

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

6 participants