Don't assume all routes are handled in Angular

The routeChangeSuccess event listener assumes that there will be a route. This
is not the case if the current route isn't defined by Angular and can result in
JavaScript errors.

(cherry picked from commit cb0e260dc3e6aaf6d03801c62cff3ec9d4625be1)