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

Initial deep state through $deepStateRedirect #150

Closed
jvisser opened this issue Jan 30, 2015 · 6 comments
Closed

Initial deep state through $deepStateRedirect #150

jvisser opened this issue Jan 30, 2015 · 6 comments
Assignees
Milestone

Comments

@jvisser
Copy link

jvisser commented Jan 30, 2015

Hi,

I was wondering if its possible to set an initial deep state, for example:

$deepStateRedirect.setInitialState("state1", "state1.childstate11.childstate111");

When state1 is first entered it wil direct to state1.childstate11.childstate111.

Thanks,
jvisser

@christopherthielen
Copy link
Owner

Definitely. This has been in my todo for some time.

@jvisser
Copy link
Author

jvisser commented Feb 1, 2015

Just tested this, works like a charm :)
Thanks!

@christopherthielen
Copy link
Owner

sweet. I hadn't even pushed the new docs yet, hah!

http://christopherthielen.github.io/ui-router-extras/#/dsr

@jvisser
Copy link
Author

jvisser commented Feb 1, 2015

Not sure if this is a new issue or related to this one. I noticed a sticky leaf state with parameter not reloading when reentering (this worked with 0.0.11). When I turned on firebug I noticed an exception on every state change: 'state is undefined' happening on this line.

https://github.com/christopherthielen/ui-router-extras/blob/master/src/sticky.js#L440

@christopherthielen
Copy link
Owner

Doh. Likely unrelated. Are you using the new modular build, or full ct-ui-router-extras.js? Could you put this into a plunkr for me?

@shanesmith
Copy link

Also running into @jvisser's issue so I've created a plunkr below.

http://plnkr.co/edit/po3jqSI7swYrAVaUFwxj?p=preview

Some quick sleuthing tell me that the bug is somehow related to https://github.com/christopherthielen/ui-router-extras/blob/master/src/transition.js#L43 and how it's used a few dozen lines below, probably should be returning data instead...

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

No branches or pull requests

3 participants