Adds onRoute method to AppRouter

Completes #695