{"action":"created","issue":{"url":"https://api.github.com/repos/angular/router/issues/118","labels_url":"https://api.github.com/repos/angular/router/issues/118/labels{/name}","comments_url":"https://api.github.com/repos/angular/router/issues/118/comments","events_url":"https://api.github.com/repos/angular/router/issues/118/events","html_url":"https://github.com/angular/router/issues/118","id":58194684,"number":118,"title":"How can I link to a route that resolves in two components?","user":{"login":"PascalPrecht","id":445106,"avatar_url":"https://avatars.githubusercontent.com/u/445106?v=3","gravatar_id":"","url":"https://api.github.com/users/PascalPrecht","html_url":"https://github.com/PascalPrecht","followers_url":"https://api.github.com/users/PascalPrecht/followers","following_url":"https://api.github.com/users/PascalPrecht/following{/other_user}","gists_url":"https://api.github.com/users/PascalPrecht/gists{/gist_id}","starred_url":"https://api.github.com/users/PascalPrecht/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PascalPrecht/subscriptions","organizations_url":"https://api.github.com/users/PascalPrecht/orgs","repos_url":"https://api.github.com/users/PascalPrecht/repos","events_url":"https://api.github.com/users/PascalPrecht/events{/privacy}","received_events_url":"https://api.github.com/users/PascalPrecht/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular/router/labels/type:%20ergo","name":"type: ergo","color":"c7def8"},{"url":"https://api.github.com/repos/angular/router/labels/type:%20question","name":"type: question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/angular/router/milestones/6","html_url":"https://github.com/angular/router/milestones/post%20ng-conf","labels_url":"https://api.github.com/repos/angular/router/milestones/6/labels","id":966205,"number":6,"title":"post ng-conf","description":"These are things that don't need to be done for ng-conf. I might pull tasks from here as needed and finish them before ng-conf, but they aren't strictly necessary.","creator":{"login":"btford","id":474988,"avatar_url":"https://avatars.githubusercontent.com/u/474988?v=3","gravatar_id":"","url":"https://api.github.com/users/btford","html_url":"https://github.com/btford","followers_url":"https://api.github.com/users/btford/followers","following_url":"https://api.github.com/users/btford/following{/other_user}","gists_url":"https://api.github.com/users/btford/gists{/gist_id}","starred_url":"https://api.github.com/users/btford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/btford/subscriptions","organizations_url":"https://api.github.com/users/btford/orgs","repos_url":"https://api.github.com/users/btford/repos","events_url":"https://api.github.com/users/btford/events{/privacy}","received_events_url":"https://api.github.com/users/btford/received_events","type":"User","site_admin":false},"open_issues":28,"closed_issues":0,"state":"open","created_at":"2015-02-04T21:59:05Z","updated_at":"2015-02-26T21:41:23Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2015-02-19T11:10:09Z","updated_at":"2015-02-26T21:58:00Z","closed_at":null,"body":"Let's say we have basic router configuration that has two routes configured. One maps to one component, the other one loads and instantiates let's say **two** components.\r\n\r\n```js\r\napp.controller('AppController', function ($router) {\r\n  $router.config([\r\n    {\r\n      path: '/',\r\n      component: 'welcome'\r\n    },\r\n    {\r\n      path: '/other-route',\r\n      components: {\r\n        viewportA: 'componentA',\r\n        viewportB: 'componentB'\r\n      }\r\n  ]);\r\n});\r\n```\r\n\r\nLet's assume we have all templates and controller defined, so that this setup actually works.\r\n\r\nNow we want to add a `routerLink` to the `welcome` component, to link to `/other-route`. Usually, `routerLink` expects a component name. So what we can do is:\r\n\r\n```html\r\n<a router-link=\"componentName\">Link to component foo</a>\r\n```\r\n\r\nBut our configured `/other-route` comes with **two** components. So how do we navigate to that sort of \"state\"? Is that something that should be handled by `routerLink` at all, or should I go back to plain old anchor tag?\r\n\r\nAlso, when happens if we want to navigate to that route, and configure all it's components with `$routeParams`?\r\n\r\nFor one component we can do sth. like:\r\n\r\n```html\r\n<a router-link=\"user({id: app.user.id})\">{{app.user.name}}</a>\r\n```\r\n\r\nWhereas the `user` component might have it's route configured like `/user/:id`. How would that work if a route has more than one component that can also be configured with parameters?"},"comment":{"url":"https://api.github.com/repos/angular/router/issues/comments/76283100","html_url":"https://github.com/angular/router/issues/118#issuecomment-76283100","issue_url":"https://api.github.com/repos/angular/router/issues/118","id":76283100,"user":{"login":"btford","id":474988,"avatar_url":"https://avatars.githubusercontent.com/u/474988?v=3","gravatar_id":"","url":"https://api.github.com/users/btford","html_url":"https://github.com/btford","followers_url":"https://api.github.com/users/btford/followers","following_url":"https://api.github.com/users/btford/following{/other_user}","gists_url":"https://api.github.com/users/btford/gists{/gist_id}","starred_url":"https://api.github.com/users/btford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/btford/subscriptions","organizations_url":"https://api.github.com/users/btford/orgs","repos_url":"https://api.github.com/users/btford/repos","events_url":"https://api.github.com/users/btford/events{/privacy}","received_events_url":"https://api.github.com/users/btford/received_events","type":"User","site_admin":false},"created_at":"2015-02-26T21:58:00Z","updated_at":"2015-02-26T21:58:00Z","body":"yeah, exactly.\n\nthen by \"convention\" single-level routes have the same name as the\ncomponent.\n\nOn Thu, Feb 26, 2015 at 1:36 PM Pascal Precht <notifications@github.com>\nwrote:\n\n> Like the state name in ui-router?\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/angular/router/issues/118#issuecomment-76279144>.\n>\n"}}