Angular: directive for route handling