Best way to access the current route in Durandal 2.0

565 views
Skip to first unread message

Patrick Walters

unread,
Aug 29, 2013, 10:38:49 AM8/29/13
to duran...@googlegroups.com
I have created a new property in the settings object in route set-up that contains a bool.  When I change views I want to set a property in shell to the router.currentRoute().(my property) but currentRoute of course doesn't exist.

I have looked at activeItem, but that seems a hackish way to have to do it.  Is there another way to look at the current route that is active to access it's properties?  I have been going through Durandal 2.0 and cannot find a solution as of yet.

(Basically I want to set an observable equal to an observable property in Durandal that shows whether I should display a div or not)

Rob Eisenberg

unread,
Aug 29, 2013, 10:44:06 AM8/29/13
to Patrick Walters, duran...@googlegroups.com


--
You received this message because you are subscribed to the Google Groups "DurandalJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to durandaljs+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Rob Eisenberg,
President - Blue Spire
www.durandaljs.com
Reply all
Reply to author
Forward
0 new messages