{"action":"closed","issue":{"url":"https://api.github.com/repos/aurelia/router/issues/276","labels_url":"https://api.github.com/repos/aurelia/router/issues/276/labels{/name}","comments_url":"https://api.github.com/repos/aurelia/router/issues/276/comments","events_url":"https://api.github.com/repos/aurelia/router/issues/276/events","html_url":"https://github.com/aurelia/router/issues/276","id":126002553,"number":276,"title":"Allow empty routes","user":{"login":"jebbench","id":1029732,"avatar_url":"https://avatars.githubusercontent.com/u/1029732?v=3","gravatar_id":"","url":"https://api.github.com/users/jebbench","html_url":"https://github.com/jebbench","followers_url":"https://api.github.com/users/jebbench/followers","following_url":"https://api.github.com/users/jebbench/following{/other_user}","gists_url":"https://api.github.com/users/jebbench/gists{/gist_id}","starred_url":"https://api.github.com/users/jebbench/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jebbench/subscriptions","organizations_url":"https://api.github.com/users/jebbench/orgs","repos_url":"https://api.github.com/users/jebbench/repos","events_url":"https://api.github.com/users/jebbench/events{/privacy}","received_events_url":"https://api.github.com/users/jebbench/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-11T18:05:59Z","updated_at":"2016-01-17T19:36:47Z","closed_at":"2016-01-17T19:36:47Z","body":"### Use case\r\nI have a `<router-view>` element in my search results page (`/search/:searchTerm`) which I don't want to populate until the user has selected a search result - currently I achieve this with a \"blank\" module which is simply a module with no content.\r\nOnce the user has selected a item (`/search/:searchTerm/item/:itemKey`) the `<router-view>` loads the `ItemDetails` module which displays the item.\r\n\r\n#### Search Results Module\r\n```\r\nconfigureRouter(config, router){\r\n        config.map([\r\n            {\r\n                route:      ['/search/:searchTerm'],\r\n                name:       'search-no-item',\r\n                moduleId:   'blank',\r\n                nav:        false,\r\n                title:      'Search Results'\r\n            }, {\r\n                route:      ['/search/:searchTerm/item/:key'],\r\n                name:       'search-item',\r\n                moduleId:   'item-details',\r\n                nav:        false,\r\n                title:      'Search Results'\r\n            }\r\n        ]);\r\n        this.router = router;\r\n    }\r\n```\r\n#### Item Details Module\r\n```\r\nconfigureRouter(config, router){\r\n        config.map([\r\n            {\r\n                route:      [''],\r\n                name:       'item-general',\r\n                moduleId:   'item-general',\r\n                nav:        false,\r\n                title:      'View Item'\r\n            },{\r\n                route:      ['settings'],\r\n                name:       'item-settings',\r\n                moduleId:   'item-settings',\r\n                nav:        false,\r\n                title:      'View Item Settings'\r\n            },{\r\n                route:      ['edit'],\r\n                name:       'item-edit',\r\n                moduleId:   'item-edit',\r\n                nav:        false,\r\n                title:      'Edit Item'\r\n            }\r\n        ]);\r\n        this.router = router;\r\n    }\r\n```\r\n\r\nI'm having to load a blank module simply so Aurelia has something to drop into the `<router-view>` element."}}