{"action":"closed","issue":{"url":"https://api.github.com/repos/QubitProducts/cherrytree/issues/151","repository_url":"https://api.github.com/repos/QubitProducts/cherrytree","labels_url":"https://api.github.com/repos/QubitProducts/cherrytree/issues/151/labels{/name}","comments_url":"https://api.github.com/repos/QubitProducts/cherrytree/issues/151/comments","events_url":"https://api.github.com/repos/QubitProducts/cherrytree/issues/151/events","html_url":"https://github.com/QubitProducts/cherrytree/issues/151","id":189558928,"number":151,"title":"Error transitioning to an abstract route with an index route","user":{"login":"blikblum","id":3047126,"avatar_url":"https://avatars.githubusercontent.com/u/3047126?v=3","gravatar_id":"","url":"https://api.github.com/users/blikblum","html_url":"https://github.com/blikblum","followers_url":"https://api.github.com/users/blikblum/followers","following_url":"https://api.github.com/users/blikblum/following{/other_user}","gists_url":"https://api.github.com/users/blikblum/gists{/gist_id}","starred_url":"https://api.github.com/users/blikblum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blikblum/subscriptions","organizations_url":"https://api.github.com/users/blikblum/orgs","repos_url":"https://api.github.com/users/blikblum/repos","events_url":"https://api.github.com/users/blikblum/events{/privacy}","received_events_url":"https://api.github.com/users/blikblum/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-11-16T01:42:47Z","updated_at":"2017-01-13T00:18:52Z","closed_at":"2017-01-13T00:18:52Z","body":"I had initially the following route structure where routeClass or routeView is the route handler:\r\n\r\n```router.map(function (route) {\r\n  route('application', {path: '/', routeClass: ApplicationRoute}, function () {\r\n    route('contacts', {routeClass: ContactsRoute}, function () {\r\n      route('contactdetail', {path: ':contactid', routeClass: ContactDetailRoute})\r\n    })\r\n  })\r\n});\r\n```\r\n\r\nWhen a transition matches application i'm redirecting to contacts \r\n```\r\n  if (transition.path === '/') {\r\n    transition.redirectTo('contacts')\r\n  }\r\n```\r\n\r\nThen i needed to render an empty view when no contact is selected so i changed 'contacts' route to abstract and created a child index route ('contactnoselection'): \r\n\r\n```\r\nrouter.map(function (route) {\r\n  route('application', {path: '/', routeClass: ApplicationRoute}, function () {\r\n    route('contacts', {routeClass: ContactsRoute, abstract: true}, function () {\r\n      route('contactnoselection', {path: '', viewClass: ContactNoSelectionView})\r\n      route('contactdetail', {path: ':contactid', routeClass: ContactDetailRoute})\r\n    })\r\n  })\r\n});\r\n```\r\nIf i enter the URL with #contacts hash, it works but it fails when redirecting to 'contacts' route with \"No route is named contacts\" message.\r\n\r\nWhile i could change the redirect to 'contactnoselection' route, this is far from ideal. If eventually i change the 'contacts' index route or decide to revert back to not using index route, i will need to update the redirectTo call again.\r\n\r\nPosting here, to know if there are other alternatives and if is doable to allow transition to an abstract route with an index route"}}
{"actor":{"display_login":"blikblum"}}