{"action":"created","issue":{"url":"https://api.github.com/repos/aurelia/framework/issues/119","labels_url":"https://api.github.com/repos/aurelia/framework/issues/119/labels{/name}","comments_url":"https://api.github.com/repos/aurelia/framework/issues/119/comments","events_url":"https://api.github.com/repos/aurelia/framework/issues/119/events","html_url":"https://github.com/aurelia/framework/issues/119","id":81596784,"number":119,"title":"Parameterized child routes","user":{"login":"mandulov","id":11997845,"avatar_url":"https://avatars.githubusercontent.com/u/11997845?v=3","gravatar_id":"","url":"https://api.github.com/users/mandulov","html_url":"https://github.com/mandulov","followers_url":"https://api.github.com/users/mandulov/followers","following_url":"https://api.github.com/users/mandulov/following{/other_user}","gists_url":"https://api.github.com/users/mandulov/gists{/gist_id}","starred_url":"https://api.github.com/users/mandulov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mandulov/subscriptions","organizations_url":"https://api.github.com/users/mandulov/orgs","repos_url":"https://api.github.com/users/mandulov/repos","events_url":"https://api.github.com/users/mandulov/events{/privacy}","received_events_url":"https://api.github.com/users/mandulov/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/aurelia/framework/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-05-27T19:49:02Z","updated_at":"2015-06-02T20:02:58Z","closed_at":"2015-06-01T23:06:35Z","body":"The documentation is very lacking on the subject.\r\nI want to create a child router with optional **id** parameter, which will handle the following example routes: **user/create**, **user/:id/edit**, **user/:id/roles**, etc.\r\n\r\nHere is an another issue (with activate method's params object):\r\n```\r\n{ route: 'user/:id', moduleId: './user/index', nav: false }\r\n```\r\nWith this code, the activate method of the **user/index** module recieves the params object, with the **id** property set to the given value. But the module has a child router:\r\n```\r\n{ route: ['', 'edit'], moduleId: './edit/edit', nav: true, title: 'Edit user' },\r\n{ route: 'roles', moduleId: './roles/roles', nav: true, title: 'Edit user roles' }\r\n```\r\nNow the activate methods of **user/edit/edit** and **user/roles/roles** params objects do not have an **id** property, which I need for the views."},"comment":{"url":"https://api.github.com/repos/aurelia/framework/issues/comments/108079897","html_url":"https://github.com/aurelia/framework/issues/119#issuecomment-108079897","issue_url":"https://api.github.com/repos/aurelia/framework/issues/119","id":108079897,"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-06-02T20:02:58Z","updated_at":"2015-06-02T20:02:58Z","body":"I was thinking we'd also pull $parent off of the object passed to `activate`, to make it safe for things like iteration & serialization. You'd have to use instruction.params and instruction.params.$parent for the separated objects. You're right that it would be a breaking change, so maybe it's not worth removing the property."}}