Is it possible to read can route data values in view model?
Let’s say I have
When I go to the first page which uses can.route.data.resource it’s all good. When I to the the second page can route detects the change of the hash and invokes the logic on the first page before page is changed.
Here’s the JS Bin example:
You can see that categoryPromise is called when you enter and when you leave categories page.
Can I read the route attributes somehow? Or do I have to pass route attributes around like that and then use this.resource in view model.