{"action":"opened","issue":{"url":"https://api.github.com/repos/aurelia/router/issues/345","repository_url":"https://api.github.com/repos/aurelia/router","labels_url":"https://api.github.com/repos/aurelia/router/issues/345/labels{/name}","comments_url":"https://api.github.com/repos/aurelia/router/issues/345/comments","events_url":"https://api.github.com/repos/aurelia/router/issues/345/events","html_url":"https://github.com/aurelia/router/issues/345","id":156810136,"number":345,"title":"configureRouter from a feature view-model","user":{"login":"TGMorais","id":759052,"avatar_url":"https://avatars.githubusercontent.com/u/759052?v=3","gravatar_id":"","url":"https://api.github.com/users/TGMorais","html_url":"https://github.com/TGMorais","followers_url":"https://api.github.com/users/TGMorais/followers","following_url":"https://api.github.com/users/TGMorais/following{/other_user}","gists_url":"https://api.github.com/users/TGMorais/gists{/gist_id}","starred_url":"https://api.github.com/users/TGMorais/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TGMorais/subscriptions","organizations_url":"https://api.github.com/users/TGMorais/orgs","repos_url":"https://api.github.com/users/TGMorais/repos","events_url":"https://api.github.com/users/TGMorais/events{/privacy}","received_events_url":"https://api.github.com/users/TGMorais/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-25T17:45:41Z","updated_at":"2016-05-25T17:45:41Z","closed_at":null,"body":"Hi,\r\n\r\nI have been trying to setup a child router inside a feature, with no success.\r\n\r\nAs the docs say, to setup a child router one only has to call `configureRouter()` from the intended view-model.\r\nHowever when I do this from a feature view-model, `configureRouter` is never called.\r\n I wonder if this is intended behaviour.\r\n\r\nI have something like this:\r\n\r\n`src/features/my-feature/index.js`\r\n```javascript\r\nexport function configure(config) {\r\n  config.router();\r\n  config.globalResources('./elements/my-feature');\r\n}\r\n```\r\n\r\n`src/features/my-feature/elements/my-feature.html`\r\n```html\r\n<template>\r\n    Hello from my feature!\r\n   <router-view></router-view>\r\n</template>\r\n```\r\n`src/features/my-feature/elements/my-feature.js`\r\n```javascript\r\nexport class MyFeature {\r\n  configureRouter(config, router) {\r\n      //this is never called\r\n  }\r\n}\r\n```\r\n\r\nI include the feature as ` aurelia.use.feature('features/my-feature')`, and use it in my app.\r\n\r\n`src/my-component.html`\r\n```html\r\n<template>\r\n    <my-feature></my-feature>\r\n</template>\r\n```\r\n`my-feature` template render fine, (except for the router) as I can't setup the child router in it.\r\n\r\nI have tried importing the Router and creating a child router manually inside `my-feature.js` `contructor`, but it dosen't seem to work :/.\r\n\r\nThank you.\r\n"}}
{"actor":{"display_login":"TGMorais"}}