christopherthielen / ui-router-extras

THIS PROJECT IS NO LONGER MAINTAINED -- Extras for UI-Router for AngularJS. Sticky States (a.k.a. parallel states), Deep State Redirect (for tab-like navigation), Future States (async state definition)
http://christopherthielen.github.io/ui-router-extras/
MIT License
915 stars 211 forks source link

Sticky Siblings FutureStates #335

Closed mikmikmik closed 8 years ago

mikmikmik commented 8 years ago

Hi, thanks a lot to everyone who contributed to this awesome lib! I have an issue understanding the proper way to integrate siblings views that do not disappear when you click on another sibling. I manage to do it when i set Sticky states with a named ui-view to each of them. So I have 2 questions: 1 - Do I need a different ui-view for each sticky state and if so can I generate it "on-the-fly" ? 2 - How can I do this with FutureStates? I made a plunker to clarify the issue: https://embed.plnkr.co/heoEx7SccD7qAqAo0Aj5/

Thanks for the help. Cheers

mikmikmik commented 8 years ago

Ok... so I managed to answer my question 2, instantiate different views with futureState: https://embed.plnkr.co/D2rt9yaZ4KCn2cnklaFc/

I'll try to see if I can instantiate them several times as tabs generated on the fly... I guess with a ui-view added for each one.

mikmikmik commented 8 years ago

It seems my first question is already answered here: #177

mikmikmik commented 8 years ago

I tried to instantiate states at runtime with a module but it didn't work: https://embed.plnkr.co/ywBBjCejxn7S087yNorU/

I'll do it differently outside of states...

christopherthielen commented 8 years ago

In theory this should work.

I'll do it differently outside of states...

Yeah, I think states might not be appropriate to do this kind of thing.