title: What's the cleanest way to add a hook on certain path changes?
body: <p>I'd like to add a hook function when the "path namespace" changes. For example, when the router goes from <em>myapp/<strong>fields</strong>/9837278993</em> to <em>myapp/<strong>lists</strong>/183727856</em>. Of course I could use some regex conditional logic in the main <code>onBeforeAction</code> hook. The more abstract logic would be "when namespace goes from <strong>fields</strong> to <strong>any except fields</strong> run the hook. What are your suggestions? Thanks for your help! </p>