dsuryd / dotNetify

Simple, lightweight, yet powerful way to build real-time web apps.
https://dotnetify.net
Other
1.17k stars 164 forks source link

Getting active route info #281

Closed behnam-basketasia closed 3 years ago

behnam-basketasia commented 3 years ago

How can i get active route info in my AppLayout Vm, my AppLayout vm is place that i write all of my routingTemplate info. is there any way to find out active route info? for example i wanna know if logout route that is a GET method is activated, before that AppLayout vm is called with related constructor, at this step, i want to get current Url, that in my example is /logout and set some strategy for it.

dsuryd commented 3 years ago

The OnActivated event from the IRoutable interface will get you the active route info.

dsuryd commented 3 years ago

Did I answer your question? Please close this issue if so.