{"action":"created","comment":{"url":"https://api.github.com/repos/angular/angular/pulls/comments/207684201","pull_request_review_id":143354986,"id":207684201,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNzY4NDIwMQ==","diff_hunk":"@@ -155,7 +155,11 @@ class ApplyRedirects {\n             throw e;\n           }));\n         }),\n-        concatAll(), first((s: any) => !!s), catchError((e: any, _: any) => {\n+        concatAll());\n+    const first$: any = route$.pipe(first((s: any) => !!s));\n+    return route$.pipe(\n+        last((s: any) => !!s), mergeMap(() => first$, 1), first((s: any) => s),","path":"packages/router/src/apply_redirects.ts","position":26,"original_position":26,"commit_id":"a4b4b35e598375447504d038f361260fa8209b7c","original_commit_id":"a4b4b35e598375447504d038f361260fa8209b7c","user":{"login":"JoostK","id":123679,"node_id":"MDQ6VXNlcjEyMzY3OQ==","avatar_url":"https://avatars3.githubusercontent.com/u/123679?v=4","gravatar_id":"","url":"https://api.github.com/users/JoostK","html_url":"https://github.com/JoostK","followers_url":"https://api.github.com/users/JoostK/followers","following_url":"https://api.github.com/users/JoostK/following{/other_user}","gists_url":"https://api.github.com/users/JoostK/gists{/gist_id}","starred_url":"https://api.github.com/users/JoostK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoostK/subscriptions","organizations_url":"https://api.github.com/users/JoostK/orgs","repos_url":"https://api.github.com/users/JoostK/repos","events_url":"https://api.github.com/users/JoostK/events{/privacy}","received_events_url":"https://api.github.com/users/JoostK/received_events","type":"User","site_admin":false},"body":"Anyway, I'm fine with sticking to as little RxJS operators as possible for sure 👍 ","created_at":"2018-08-03T22:47:43Z","updated_at":"2018-08-03T22:47:43Z","html_url":"https://github.com/angular/angular/pull/16416#discussion_r207684201","pull_request_url":"https://api.github.com/repos/angular/angular/pulls/16416","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/angular/angular/pulls/comments/207684201"},"html":{"href":"https://github.com/angular/angular/pull/16416#discussion_r207684201"},"pull_request":{"href":"https://api.github.com/repos/angular/angular/pulls/16416"}},"in_reply_to_id":207495328},"pull_request":{"url":"https://api.github.com/repos/angular/angular/pulls/16416","id":118203761,"node_id":"MDExOlB1bGxSZXF1ZXN0MTE4MjAzNzYx","html_url":"https://github.com/angular/angular/pull/16416","diff_url":"https://github.com/angular/angular/pull/16416.diff","patch_url":"https://github.com/angular/angular/pull/16416.patch","issue_url":"https://api.github.com/repos/angular/angular/issues/16416","number":16416,"state":"open","locked":false,"title":"feat(router): Cascading route support","user":{"login":"matthewerwin","id":1517954,"node_id":"MDQ6VXNlcjE1MTc5NTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1517954?v=4","gravatar_id":"","url":"https://api.github.com/users/matthewerwin","html_url":"https://github.com/matthewerwin","followers_url":"https://api.github.com/users/matthewerwin/followers","following_url":"https://api.github.com/users/matthewerwin/following{/other_user}","gists_url":"https://api.github.com/users/matthewerwin/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewerwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewerwin/subscriptions","organizations_url":"https://api.github.com/users/matthewerwin/orgs","repos_url":"https://api.github.com/users/matthewerwin/repos","events_url":"https://api.github.com/users/matthewerwin/events{/privacy}","received_events_url":"https://api.github.com/users/matthewerwin/received_events","type":"User","site_admin":false},"body":"Added cascading routes capability to the router, added new test cases.\nPrevious behavior resulted in dead routes (e.g. direct navigation to a\nroute with canActivate=>false resulted in blank page). Additionally this\nfeature improvement provides conditional routing based on params and other\ninformation that could be used to dynamically enable/disable a route while\nensuring the user always falls through to a valid route.\n\nThis PR passes all latest tests and should be backwards compatible.\n\n**Please check if the PR fulfills these requirements**\n- [X] The commit message follows our guidelines: https://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit\n- [X] Tests for the changes have been added (for bug fixes / features)\n- [X] Docs have been added / updated (for bug fixes / features) \n\n\n**What kind of change does this PR introduce?** (check one with \"x\")\n```\n[X] Bugfix\n[X] Feature\n[ ] Code style update (formatting, local variables)\n[ ] Refactoring (no functional changes, no api changes)\n[ ] Build related changes\n[ ] CI related changes\n[ ] Other... Please describe:\n```\n\n**What is the current behavior?** (You can also link to an open issue here)\nhttps://github.com/angular/angular/issues/16211\n\nCurrent behavior results in a dead link/route when routes are inaccessible due to canActivate rejecting the promise or returning false.\n\nRouter attempts to recover state to originating route state when canActivate or other preactivation guards fail (e.g. data loading guard). This either leaves the user clicking a link that does nothing, a blank page if the URL is hit directly (bookmark, external site link, page refresh while canActivate  changes since original load).\n\n\n**What is the new behavior?**\nNew behavior falls through to other valid routes including the default '**' route to give the user a 404 or other message. This allows more sophisticated routing scenarios based on conditionality as well as elegant handling for no-access scenarios that do not redirect.\n\n\n**Does this PR introduce a breaking change?** (check one with \"x\")\n```\n[ ] Yes\n[ X ] No\n\nAll tests passed. New tests written to cover the fall through scenarios.\n```\n\nIf this PR contains a breaking change, please describe the impact and migration path for existing applications: ...\n\n\n**Other information**:","created_at":"2017-04-28T17:59:59Z","updated_at":"2018-08-03T22:47:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e8d52c865001259189ca76eb621dcae5e29c6bb0","assignee":{"login":"jasonaden","id":516168,"node_id":"MDQ6VXNlcjUxNjE2OA==","avatar_url":"https://avatars3.githubusercontent.com/u/516168?v=4","gravatar_id":"","url":"https://api.github.com/users/jasonaden","html_url":"https://github.com/jasonaden","followers_url":"https://api.github.com/users/jasonaden/followers","following_url":"https://api.github.com/users/jasonaden/following{/other_user}","gists_url":"https://api.github.com/users/jasonaden/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonaden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonaden/subscriptions","organizations_url":"https://api.github.com/users/jasonaden/orgs","repos_url":"https://api.github.com/users/jasonaden/repos","events_url":"https://api.github.com/users/jasonaden/events{/privacy}","received_events_url":"https://api.github.com/users/jasonaden/received_events","type":"User","site_admin":false},"assignees":[{"login":"jasonaden","id":516168,"node_id":"MDQ6VXNlcjUxNjE2OA==","avatar_url":"https://avatars3.githubusercontent.com/u/516168?v=4","gravatar_id":"","url":"https://api.github.com/users/jasonaden","html_url":"https://github.com/jasonaden","followers_url":"https://api.github.com/users/jasonaden/followers","following_url":"https://api.github.com/users/jasonaden/following{/other_user}","gists_url":"https://api.github.com/users/jasonaden/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonaden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonaden/subscriptions","organizations_url":"https://api.github.com/users/jasonaden/orgs","repos_url":"https://api.github.com/users/jasonaden/repos","events_url":"https://api.github.com/users/jasonaden/events{/privacy}","received_events_url":"https://api.github.com/users/jasonaden/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":135584804,"node_id":"MDU6TGFiZWwxMzU1ODQ4MDQ=","url":"https://api.github.com/repos/angular/angular/labels/PR%20action:%20cleanup","name":"PR action: cleanup","color":"e11d21","default":false},{"id":149476251,"node_id":"MDU6TGFiZWwxNDk0NzYyNTE=","url":"https://api.github.com/repos/angular/angular/labels/cla:%20yes","name":"cla: yes","color":"009800","default":false},{"id":375500771,"node_id":"MDU6TGFiZWwzNzU1MDA3NzE=","url":"https://api.github.com/repos/angular/angular/labels/comp:%20router","name":"comp: router","color":"c7def8","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/angular/angular/pulls/16416/commits","review_comments_url":"https://api.github.com/repos/angular/angular/pulls/16416/comments","review_comment_url":"https://api.github.com/repos/angular/angular/pulls/comments{/number}","comments_url":"https://api.github.com/repos/angular/angular/issues/16416/comments","statuses_url":"https://api.github.com/repos/angular/angular/statuses/a4b4b35e598375447504d038f361260fa8209b7c","head":{"label":"snaptech:route-guard-flow","ref":"route-guard-flow","sha":"a4b4b35e598375447504d038f361260fa8209b7c","user":{"login":"snaptech","id":20546420,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwNTQ2NDIw","avatar_url":"https://avatars0.githubusercontent.com/u/20546420?v=4","gravatar_id":"","url":"https://api.github.com/users/snaptech","html_url":"https://github.com/snaptech","followers_url":"https://api.github.com/users/snaptech/followers","following_url":"https://api.github.com/users/snaptech/following{/other_user}","gists_url":"https://api.github.com/users/snaptech/gists{/gist_id}","starred_url":"https://api.github.com/users/snaptech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snaptech/subscriptions","organizations_url":"https://api.github.com/users/snaptech/orgs","repos_url":"https://api.github.com/users/snaptech/repos","events_url":"https://api.github.com/users/snaptech/events{/privacy}","received_events_url":"https://api.github.com/users/snaptech/received_events","type":"Organization","site_admin":false},"repo":{"id":88903951,"node_id":"MDEwOlJlcG9zaXRvcnk4ODkwMzk1MQ==","name":"angular","full_name":"snaptech/angular","owner":{"login":"snaptech","id":20546420,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwNTQ2NDIw","avatar_url":"https://avatars0.githubusercontent.com/u/20546420?v=4","gravatar_id":"","url":"https://api.github.com/users/snaptech","html_url":"https://github.com/snaptech","followers_url":"https://api.github.com/users/snaptech/followers","following_url":"https://api.github.com/users/snaptech/following{/other_user}","gists_url":"https://api.github.com/users/snaptech/gists{/gist_id}","starred_url":"https://api.github.com/users/snaptech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snaptech/subscriptions","organizations_url":"https://api.github.com/users/snaptech/orgs","repos_url":"https://api.github.com/users/snaptech/repos","events_url":"https://api.github.com/users/snaptech/events{/privacy}","received_events_url":"https://api.github.com/users/snaptech/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/snaptech/angular","description":"One framework. Mobile & desktop.","fork":true,"url":"https://api.github.com/repos/snaptech/angular","forks_url":"https://api.github.com/repos/snaptech/angular/forks","keys_url":"https://api.github.com/repos/snaptech/angular/keys{/key_id}","collaborators_url":"https://api.github.com/repos/snaptech/angular/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/snaptech/angular/teams","hooks_url":"https://api.github.com/repos/snaptech/angular/hooks","issue_events_url":"https://api.github.com/repos/snaptech/angular/issues/events{/number}","events_url":"https://api.github.com/repos/snaptech/angular/events","assignees_url":"https://api.github.com/repos/snaptech/angular/assignees{/user}","branches_url":"https://api.github.com/repos/snaptech/angular/branches{/branch}","tags_url":"https://api.github.com/repos/snaptech/angular/tags","blobs_url":"https://api.github.com/repos/snaptech/angular/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/snaptech/angular/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/snaptech/angular/git/refs{/sha}","trees_url":"https://api.github.com/repos/snaptech/angular/git/trees{/sha}","statuses_url":"https://api.github.com/repos/snaptech/angular/statuses/{sha}","languages_url":"https://api.github.com/repos/snaptech/angular/languages","stargazers_url":"https://api.github.com/repos/snaptech/angular/stargazers","contributors_url":"https://api.github.com/repos/snaptech/angular/contributors","subscribers_url":"https://api.github.com/repos/snaptech/angular/subscribers","subscription_url":"https://api.github.com/repos/snaptech/angular/subscription","commits_url":"https://api.github.com/repos/snaptech/angular/commits{/sha}","git_commits_url":"https://api.github.com/repos/snaptech/angular/git/commits{/sha}","comments_url":"https://api.github.com/repos/snaptech/angular/comments{/number}","issue_comment_url":"https://api.github.com/repos/snaptech/angular/issues/comments{/number}","contents_url":"https://api.github.com/repos/snaptech/angular/contents/{+path}","compare_url":"https://api.github.com/repos/snaptech/angular/compare/{base}...{head}","merges_url":"https://api.github.com/repos/snaptech/angular/merges","archive_url":"https://api.github.com/repos/snaptech/angular/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/snaptech/angular/downloads","issues_url":"https://api.github.com/repos/snaptech/angular/issues{/number}","pulls_url":"https://api.github.com/repos/snaptech/angular/pulls{/number}","milestones_url":"https://api.github.com/repos/snaptech/angular/milestones{/number}","notifications_url":"https://api.github.com/repos/snaptech/angular/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/snaptech/angular/labels{/name}","releases_url":"https://api.github.com/repos/snaptech/angular/releases{/id}","deployments_url":"https://api.github.com/repos/snaptech/angular/deployments","created_at":"2017-04-20T19:40:13Z","updated_at":"2017-04-20T19:40:36Z","pushed_at":"2018-08-02T23:42:34Z","git_url":"git://github.com/snaptech/angular.git","ssh_url":"git@github.com:snaptech/angular.git","clone_url":"https://github.com/snaptech/angular.git","svn_url":"https://github.com/snaptech/angular","homepage":"https://angular.io","size":81727,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"angular:master","ref":"master","sha":"4f741e74e1d9a21359f6a049d4110581a6176796","user":{"login":"angular","id":139426,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzOTQyNg==","avatar_url":"https://avatars3.githubusercontent.com/u/139426?v=4","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"repo":{"id":24195339,"node_id":"MDEwOlJlcG9zaXRvcnkyNDE5NTMzOQ==","name":"angular","full_name":"angular/angular","owner":{"login":"angular","id":139426,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzOTQyNg==","avatar_url":"https://avatars3.githubusercontent.com/u/139426?v=4","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/angular/angular","description":"One framework. Mobile & desktop.","fork":false,"url":"https://api.github.com/repos/angular/angular","forks_url":"https://api.github.com/repos/angular/angular/forks","keys_url":"https://api.github.com/repos/angular/angular/keys{/key_id}","collaborators_url":"https://api.github.com/repos/angular/angular/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/angular/angular/teams","hooks_url":"https://api.github.com/repos/angular/angular/hooks","issue_events_url":"https://api.github.com/repos/angular/angular/issues/events{/number}","events_url":"https://api.github.com/repos/angular/angular/events","assignees_url":"https://api.github.com/repos/angular/angular/assignees{/user}","branches_url":"https://api.github.com/repos/angular/angular/branches{/branch}","tags_url":"https://api.github.com/repos/angular/angular/tags","blobs_url":"https://api.github.com/repos/angular/angular/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/angular/angular/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/angular/angular/git/refs{/sha}","trees_url":"https://api.github.com/repos/angular/angular/git/trees{/sha}","statuses_url":"https://api.github.com/repos/angular/angular/statuses/{sha}","languages_url":"https://api.github.com/repos/angular/angular/languages","stargazers_url":"https://api.github.com/repos/angular/angular/stargazers","contributors_url":"https://api.github.com/repos/angular/angular/contributors","subscribers_url":"https://api.github.com/repos/angular/angular/subscribers","subscription_url":"https://api.github.com/repos/angular/angular/subscription","commits_url":"https://api.github.com/repos/angular/angular/commits{/sha}","git_commits_url":"https://api.github.com/repos/angular/angular/git/commits{/sha}","comments_url":"https://api.github.com/repos/angular/angular/comments{/number}","issue_comment_url":"https://api.github.com/repos/angular/angular/issues/comments{/number}","contents_url":"https://api.github.com/repos/angular/angular/contents/{+path}","compare_url":"https://api.github.com/repos/angular/angular/compare/{base}...{head}","merges_url":"https://api.github.com/repos/angular/angular/merges","archive_url":"https://api.github.com/repos/angular/angular/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/angular/angular/downloads","issues_url":"https://api.github.com/repos/angular/angular/issues{/number}","pulls_url":"https://api.github.com/repos/angular/angular/pulls{/number}","milestones_url":"https://api.github.com/repos/angular/angular/milestones{/number}","notifications_url":"https://api.github.com/repos/angular/angular/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/angular/angular/labels{/name}","releases_url":"https://api.github.com/repos/angular/angular/releases{/id}","deployments_url":"https://api.github.com/repos/angular/angular/deployments","created_at":"2014-09-18T16:12:01Z","updated_at":"2018-08-03T22:31:45Z","pushed_at":"2018-08-03T22:45:28Z","git_url":"git://github.com/angular/angular.git","ssh_url":"git@github.com:angular/angular.git","clone_url":"https://github.com/angular/angular.git","svn_url":"https://github.com/angular/angular","homepage":"https://angular.io","size":83882,"stargazers_count":39179,"watchers_count":39179,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":9523,"mirror_url":null,"archived":false,"open_issues_count":2408,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":9523,"open_issues":2408,"watchers":39179,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/angular/angular/pulls/16416"},"html":{"href":"https://github.com/angular/angular/pull/16416"},"issue":{"href":"https://api.github.com/repos/angular/angular/issues/16416"},"comments":{"href":"https://api.github.com/repos/angular/angular/issues/16416/comments"},"review_comments":{"href":"https://api.github.com/repos/angular/angular/pulls/16416/comments"},"review_comment":{"href":"https://api.github.com/repos/angular/angular/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/angular/angular/pulls/16416/commits"},"statuses":{"href":"https://api.github.com/repos/angular/angular/statuses/a4b4b35e598375447504d038f361260fa8209b7c"}},"author_association":"NONE"}}
{"actor":{"display_login":"JoostK"}}