HelloWorld
HelloWorld

Reputation: 4882

Can angular ui router do parallel AND nest view state like this

I have the following workflow:

The url should be: www.domain/#hotels

The url should be www.domain/#hotels/MyName

The UI changes and the Reservations tab is the active content

The url should be www.domain/#hotels/MyName/Reservations/20/10/2014 (which is 20/10/2014 in the image)

The url should be www.domain/#hotels/MyName/Reservations/21/10/2014

Can angular ui router display the last url which means the full state including Hotels?

enter image description here

The sample here from angular ui router just shows nested routing but something for my case which I would name parallel and nested routing: http://angular-ui.github.io/ui-router/sample/#/

When you ask yourself what is so cool about having the current hote/name in the url then just think of bookmarking it :) something like #hotels/MyName/Reservation/Today

If this would be bookmarked everyday I click on the bookmarked link and in my code I parse for "Today" and translate it to the current date that when I have a quick entry point.

Upvotes: 1

Views: 1067

Answers (1)

jimbo.io
jimbo.io

Reputation: 174

I think this is along the lines of what you're after:

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

Upvotes: 3

Related Questions