{"action":"created","issue":{"url":"https://api.github.com/repos/Profiscience/ko-component-router/issues/57","repository_url":"https://api.github.com/repos/Profiscience/ko-component-router","labels_url":"https://api.github.com/repos/Profiscience/ko-component-router/issues/57/labels{/name}","comments_url":"https://api.github.com/repos/Profiscience/ko-component-router/issues/57/comments","events_url":"https://api.github.com/repos/Profiscience/ko-component-router/issues/57/events","html_url":"https://github.com/Profiscience/ko-component-router/issues/57","id":158469182,"number":57,"title":"How to handle navigating to the same page","user":{"login":"carlosagsmendes","id":1224078,"avatar_url":"https://avatars.githubusercontent.com/u/1224078?v=3","gravatar_id":"","url":"https://api.github.com/users/carlosagsmendes","html_url":"https://github.com/carlosagsmendes","followers_url":"https://api.github.com/users/carlosagsmendes/followers","following_url":"https://api.github.com/users/carlosagsmendes/following{/other_user}","gists_url":"https://api.github.com/users/carlosagsmendes/gists{/gist_id}","starred_url":"https://api.github.com/users/carlosagsmendes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carlosagsmendes/subscriptions","organizations_url":"https://api.github.com/users/carlosagsmendes/orgs","repos_url":"https://api.github.com/users/carlosagsmendes/repos","events_url":"https://api.github.com/users/carlosagsmendes/events{/privacy}","received_events_url":"https://api.github.com/users/carlosagsmendes/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2016-06-03T22:52:03Z","updated_at":"2016-06-07T14:47:59Z","closed_at":null,"body":"Hi @caseyWebb, when navigating to the same route (e.g., users/1, users/2, etc, for a users/:userId route) the respective component is not reloaded. \r\n\r\nAs such, currently, I'm subscribing to the `ctx.params.userId` Observable to detect the navigation change. Then I have to handle the disposal cycle and call the `dispose()`method on the KO component, reload the data, etc.\r\n\r\nI was wondering if it wouldn't be possible to call the component's `dispose()` automatically and instantiate a new viewModel with the new params.\r\n\r\nThanks \r\n\r\n "},"comment":{"url":"https://api.github.com/repos/Profiscience/ko-component-router/issues/comments/224304479","html_url":"https://github.com/Profiscience/ko-component-router/issues/57#issuecomment-224304479","issue_url":"https://api.github.com/repos/Profiscience/ko-component-router/issues/57","id":224304479,"user":{"login":"carlosagsmendes","id":1224078,"avatar_url":"https://avatars.githubusercontent.com/u/1224078?v=3","gravatar_id":"","url":"https://api.github.com/users/carlosagsmendes","html_url":"https://github.com/carlosagsmendes","followers_url":"https://api.github.com/users/carlosagsmendes/followers","following_url":"https://api.github.com/users/carlosagsmendes/following{/other_user}","gists_url":"https://api.github.com/users/carlosagsmendes/gists{/gist_id}","starred_url":"https://api.github.com/users/carlosagsmendes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carlosagsmendes/subscriptions","organizations_url":"https://api.github.com/users/carlosagsmendes/orgs","repos_url":"https://api.github.com/users/carlosagsmendes/repos","events_url":"https://api.github.com/users/carlosagsmendes/events{/privacy}","received_events_url":"https://api.github.com/users/carlosagsmendes/received_events","type":"User","site_admin":false},"created_at":"2016-06-07T14:47:59Z","updated_at":"2016-06-07T14:47:59Z","body":"I was reading the [documentation ](http://knockoutjs.com/documentation/component-loaders.html) and they mention that:\r\n\r\n_To supply a createViewModel function, call callback(yourCreateViewModelFunction). The createViewModel function must accept parameters (params, componentInfo) and **must synchronously return a new viewmodel instance** each time it is called._\r\n\r\nTherefore it is not possible to use promises in the create view model factory, right?\r\n\r\n"}}
{"actor":{"display_login":"carlosagsmendes"}}