{"action":"created","issue":{"url":"https://api.github.com/repos/aurelia/router/issues/97","labels_url":"https://api.github.com/repos/aurelia/router/issues/97/labels{/name}","comments_url":"https://api.github.com/repos/aurelia/router/issues/97/comments","events_url":"https://api.github.com/repos/aurelia/router/issues/97/events","html_url":"https://github.com/aurelia/router/pull/97","id":75748581,"number":97,"title":"fix(router): cancelling a navigation instruction with a redirect raises the wrong navigation event","user":{"login":"bfil","id":660513,"avatar_url":"https://avatars.githubusercontent.com/u/660513?v=3","gravatar_id":"","url":"https://api.github.com/users/bfil","html_url":"https://github.com/bfil","followers_url":"https://api.github.com/users/bfil/followers","following_url":"https://api.github.com/users/bfil/following{/other_user}","gists_url":"https://api.github.com/users/bfil/gists{/gist_id}","starred_url":"https://api.github.com/users/bfil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bfil/subscriptions","organizations_url":"https://api.github.com/users/bfil/orgs","repos_url":"https://api.github.com/users/bfil/repos","events_url":"https://api.github.com/users/bfil/events{/privacy}","received_events_url":"https://api.github.com/users/bfil/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/aurelia/router/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"bryanrsmith","id":186704,"avatar_url":"https://avatars.githubusercontent.com/u/186704?v=3","gravatar_id":"","url":"https://api.github.com/users/bryanrsmith","html_url":"https://github.com/bryanrsmith","followers_url":"https://api.github.com/users/bryanrsmith/followers","following_url":"https://api.github.com/users/bryanrsmith/following{/other_user}","gists_url":"https://api.github.com/users/bryanrsmith/gists{/gist_id}","starred_url":"https://api.github.com/users/bryanrsmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bryanrsmith/subscriptions","organizations_url":"https://api.github.com/users/bryanrsmith/orgs","repos_url":"https://api.github.com/users/bryanrsmith/repos","events_url":"https://api.github.com/users/bryanrsmith/events{/privacy}","received_events_url":"https://api.github.com/users/bryanrsmith/received_events","type":"User","site_admin":false},"milestone":null,"comments":6,"created_at":"2015-05-12T21:38:50Z","updated_at":"2015-05-25T18:36:33Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/aurelia/router/pulls/97","html_url":"https://github.com/aurelia/router/pull/97","diff_url":"https://github.com/aurelia/router/pull/97.diff","patch_url":"https://github.com/aurelia/router/pull/97.patch"},"body":"Using the following `AuthorizeStep` (provided as an example in the Aurelia documentation):\r\n\r\n```javascript\r\nclass AuthorizeStep {\r\n  run(routingContext, next) {\r\n    if (routingContext.nextInstructions.some(i => i.config.auth)) {\r\n      var isLoggedIn = /* insert magic here */false;\r\n      if (!isLoggedIn) {\r\n        return next.cancel(new Redirect('login'));\r\n      }\r\n    }\r\n    return next();\r\n  }\r\n}\r\n```\r\n\r\nWhen cancelling the navigation instruction with a redirect, a `router:navigation:complete` event is raised for the cancelled instruction, instead of the expected `router:navigation:cancelled`.\r\n"},"comment":{"url":"https://api.github.com/repos/aurelia/router/issues/comments/105286575","html_url":"https://github.com/aurelia/router/pull/97#issuecomment-105286575","issue_url":"https://api.github.com/repos/aurelia/router/issues/97","id":105286575,"user":{"login":"bryanrsmith","id":186704,"avatar_url":"https://avatars.githubusercontent.com/u/186704?v=3","gravatar_id":"","url":"https://api.github.com/users/bryanrsmith","html_url":"https://github.com/bryanrsmith","followers_url":"https://api.github.com/users/bryanrsmith/followers","following_url":"https://api.github.com/users/bryanrsmith/following{/other_user}","gists_url":"https://api.github.com/users/bryanrsmith/gists{/gist_id}","starred_url":"https://api.github.com/users/bryanrsmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bryanrsmith/subscriptions","organizations_url":"https://api.github.com/users/bryanrsmith/orgs","repos_url":"https://api.github.com/users/bryanrsmith/repos","events_url":"https://api.github.com/users/bryanrsmith/events{/privacy}","received_events_url":"https://api.github.com/users/bryanrsmith/received_events","type":"User","site_admin":false},"created_at":"2015-05-25T18:36:33Z","updated_at":"2015-05-25T18:36:33Z","body":"@EisenbergEffect Think I'm almost done with a fix for #103 & then I'll take a look. I should be able to get to it today."}}