{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular/issues/13523","repository_url":"https://api.github.com/repos/angular/angular","labels_url":"https://api.github.com/repos/angular/angular/issues/13523/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/13523/comments","events_url":"https://api.github.com/repos/angular/angular/issues/13523/events","html_url":"https://github.com/angular/angular/issues/13523","id":196097134,"number":13523,"title":"Router doesn't handle two outlet changes at the same time","user":{"login":"tinchou","id":1548532,"avatar_url":"https://avatars.githubusercontent.com/u/1548532?v=3","gravatar_id":"","url":"https://api.github.com/users/tinchou","html_url":"https://github.com/tinchou","followers_url":"https://api.github.com/users/tinchou/followers","following_url":"https://api.github.com/users/tinchou/following{/other_user}","gists_url":"https://api.github.com/users/tinchou/gists{/gist_id}","starred_url":"https://api.github.com/users/tinchou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tinchou/subscriptions","organizations_url":"https://api.github.com/users/tinchou/orgs","repos_url":"https://api.github.com/users/tinchou/repos","events_url":"https://api.github.com/users/tinchou/events{/privacy}","received_events_url":"https://api.github.com/users/tinchou/received_events","type":"User","site_admin":false},"labels":[{"id":375500771,"url":"https://api.github.com/repos/angular/angular/labels/comp:%20router","name":"comp: router","color":"c7def8","default":false},{"id":130606843,"url":"https://api.github.com/repos/angular/angular/labels/type:%20bug","name":"type: bug","color":"EEEEEE","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-12-16T16:23:49Z","updated_at":"2016-12-16T21:06:52Z","closed_at":null,"body":"**I'm submitting a ...**\r\n```\r\n[X] bug report\r\n```\r\n\r\n**Current behavior**\r\n\r\nI have some routes like:\r\n\r\n```ts\r\nconst routes = [\r\n    { path: \"\", component: HomeComponent, pathMatch: \"full\" },\r\n    { path: \"profile\", component: ProfileComponent },\r\n    { path: \"menu\", component: MenuComponent, outlet: \"sidebar\" },\r\n];\r\n```\r\n\r\nWhen the route `http://localhost/(sidebar:menu)` is open, then I'm able to remove the named outlet and go to `http://localhost/` by clicking an anchor like the following:\r\n\r\n```html\r\n<a [routerLink]=\"['', {outlets: {sidebar: null}}]\">\r\n    Close\r\n</a>\r\n```\r\n\r\nWhat doesn't work is navigating away from the sidebar **and also** going to another route like  `http://localhost/profile`.\r\n\r\n```html\r\n<a [routerLink]=\"['/profile', {outlets: {sidebar: null}}]\">\r\n    Close\r\n</a>\r\n```\r\n\r\nThe link that is rendered is `http://localhost:3971/profile(sidebar:menu)`\r\n\r\n**Expected behavior**\r\n\r\nThe link that should be rendered is `http://localhost:3971/profile`.\r\n\r\n**Repro**\r\n\r\nhttps://github.com/tinchou/router-repro\r\n\r\n**Please tell us about your environment:**\r\n<!-- Operating system, IDE, package manager, HTTP server, ... -->\r\n\r\nWindows 10, Visual Studio 2017\r\n\r\n* **Angular version:** 2.3.1 (didn't work with 2.1.0 either)\r\n\r\n* **Browser:** all\r\n \r\n* **Language:** TypeScript 2.0.10"},"comment":{"url":"https://api.github.com/repos/angular/angular/issues/comments/267696029","html_url":"https://github.com/angular/angular/issues/13523#issuecomment-267696029","issue_url":"https://api.github.com/repos/angular/angular/issues/13523","id":267696029,"user":{"login":"tinchou","id":1548532,"avatar_url":"https://avatars.githubusercontent.com/u/1548532?v=3","gravatar_id":"","url":"https://api.github.com/users/tinchou","html_url":"https://github.com/tinchou","followers_url":"https://api.github.com/users/tinchou/followers","following_url":"https://api.github.com/users/tinchou/following{/other_user}","gists_url":"https://api.github.com/users/tinchou/gists{/gist_id}","starred_url":"https://api.github.com/users/tinchou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tinchou/subscriptions","organizations_url":"https://api.github.com/users/tinchou/orgs","repos_url":"https://api.github.com/users/tinchou/repos","events_url":"https://api.github.com/users/tinchou/events{/privacy}","received_events_url":"https://api.github.com/users/tinchou/received_events","type":"User","site_admin":false},"created_at":"2016-12-16T21:06:52Z","updated_at":"2016-12-16T21:06:52Z","body":"@WilliamKoza it seems to work using the `primary` outlet.  Now I found it in [the docs](https://angular.io/docs/ts/latest/guide/router.html) and it makes sense:\r\n\r\n> `outlet`: The name of the `RouterOutlet` used to render the route. For an unnamed outlet, the outlet name is **primary**.\r\n\r\nThis works perfect for me, thanks a lot (but I believe the issue still stands)."}}
{"actor":{"display_login":"tinchou"}}