{"action":"created","issue":{"url":"https://api.github.com/repos/angular-ui/ui-router/issues/384","labels_url":"https://api.github.com/repos/angular-ui/ui-router/issues/384/labels{/name}","comments_url":"https://api.github.com/repos/angular-ui/ui-router/issues/384/comments","events_url":"https://api.github.com/repos/angular-ui/ui-router/issues/384/events","html_url":"https://github.com/angular-ui/ui-router/issues/384","id":19009496,"number":384,"title":"Multiple parents for a state","user":{"login":"ProLoser","id":67395,"avatar_url":"https://avatars.githubusercontent.com/u/67395?v=3","gravatar_id":"","url":"https://api.github.com/users/ProLoser","html_url":"https://github.com/ProLoser","followers_url":"https://api.github.com/users/ProLoser/followers","following_url":"https://api.github.com/users/ProLoser/following{/other_user}","gists_url":"https://api.github.com/users/ProLoser/gists{/gist_id}","starred_url":"https://api.github.com/users/ProLoser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ProLoser/subscriptions","organizations_url":"https://api.github.com/users/ProLoser/orgs","repos_url":"https://api.github.com/users/ProLoser/repos","events_url":"https://api.github.com/users/ProLoser/events{/privacy}","received_events_url":"https://api.github.com/users/ProLoser/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular-ui/ui-router/labels/design","name":"design","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":18,"created_at":"2013-09-04T23:20:26Z","updated_at":"2015-05-21T21:53:47Z","closed_at":null,"body":"This is more of an RFC.\r\n\r\nLets say I have a child state I want to use in multiple areas of my app. Or perhaps it's more like a mixin, etc. How would you go about doing this? Should I define multiple parent states, or what?"},"comment":{"url":"https://api.github.com/repos/angular-ui/ui-router/issues/comments/104432817","html_url":"https://github.com/angular-ui/ui-router/issues/384#issuecomment-104432817","issue_url":"https://api.github.com/repos/angular-ui/ui-router/issues/384","id":104432817,"user":{"login":"mfoody","id":2894700,"avatar_url":"https://avatars.githubusercontent.com/u/2894700?v=3","gravatar_id":"","url":"https://api.github.com/users/mfoody","html_url":"https://github.com/mfoody","followers_url":"https://api.github.com/users/mfoody/followers","following_url":"https://api.github.com/users/mfoody/following{/other_user}","gists_url":"https://api.github.com/users/mfoody/gists{/gist_id}","starred_url":"https://api.github.com/users/mfoody/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfoody/subscriptions","organizations_url":"https://api.github.com/users/mfoody/orgs","repos_url":"https://api.github.com/users/mfoody/repos","events_url":"https://api.github.com/users/mfoody/events{/privacy}","received_events_url":"https://api.github.com/users/mfoody/received_events","type":"User","site_admin":false},"created_at":"2015-05-21T21:53:47Z","updated_at":"2015-05-21T21:53:47Z","body":"Good point. Concatenating the parent into the state name should solve that.\r\n\r\n```javascript\r\nangular.module('myApp').constant('loginDialog', function ($stateProvider, parent) {\r\n  $stateProvider.state(parent + '.login', {\r\n    url: '/login'\r\n  });\r\n})\r\n.config(['$stateProvider', 'loginDialog', function($stateProvider, loginDialog) {\r\n  loginDialog($stateProvider, 'buy');\r\n  loginDialog($stateProivder, 'admin');\r\n  loginDialog($stateProvider, 'user');\r\n}]);"}}