{"action":"created","issue":{"url":"https://api.github.com/repos/angular-ui/ui-router/issues/3399","repository_url":"https://api.github.com/repos/angular-ui/ui-router","labels_url":"https://api.github.com/repos/angular-ui/ui-router/issues/3399/labels{/name}","comments_url":"https://api.github.com/repos/angular-ui/ui-router/issues/3399/comments","events_url":"https://api.github.com/repos/angular-ui/ui-router/issues/3399/events","html_url":"https://github.com/angular-ui/ui-router/issues/3399","id":218949631,"number":3399,"title":"Refetch resolves without reloading the state","user":{"login":"aj-dev","id":2584733,"avatar_url":"https://avatars3.githubusercontent.com/u/2584733?v=3","gravatar_id":"","url":"https://api.github.com/users/aj-dev","html_url":"https://github.com/aj-dev","followers_url":"https://api.github.com/users/aj-dev/followers","following_url":"https://api.github.com/users/aj-dev/following{/other_user}","gists_url":"https://api.github.com/users/aj-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/aj-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aj-dev/subscriptions","organizations_url":"https://api.github.com/users/aj-dev/orgs","repos_url":"https://api.github.com/users/aj-dev/repos","events_url":"https://api.github.com/users/aj-dev/events{/privacy}","received_events_url":"https://api.github.com/users/aj-dev/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-04-03T14:22:16Z","updated_at":"2017-05-28T00:32:30Z","closed_at":null,"body":"This is a:\r\n\r\n- [ ] Bug Report\r\n- [x] Feature Request\r\n- [ ] General Query \r\n\r\nMy version of UI-Router is: v1.0.0-rc.1\r\n\r\n\r\n# Feature Request\r\n\r\nCurrently the only way to re-resolve data in previously active states is by specifying `{reload: true}` in `ui-sref-opts` directive or `$state.go()` calls. This is a huge limitation where progressive rendering is required and complete state reload is not desirable.\r\n\r\nA simplified use case:\r\nLet's say we have 2 states, a parent `cards` state representing a list of cards which has a couple of resolves and a child `cards.card` state for editing individual card. Upon card update to the server we return to the list of cards but the change is not reflected because `cards` state has not been reloaded and fresh list of cards has not been fetched from the server.\r\nReloading entire state using `{reload: true}` is undesirable because it re-resolves all dependencies even if some of them don't change at all.\r\n\r\nProposal:\r\nImplement `{reFetch: true}` which would be similar to `{reload: true}` to only re-resolve dependencies that are subject to change without reloading the state. I think a good place for this would be `resolvePolicy` to declare all resolves that should be re-fetched if `{reFetch: true}` was set via `ui-sref-opts` directive or `$state.go()`.\r\nFor instance:\r\n```\r\nresolvePolicy: {\r\n    cards: {\r\n        when: 'LAZY',\r\n        async: 'NOWAIT',\r\n        refetch: true\r\n    }\r\n}\r\n```\r\nThen on transition start we could check if `reFetch` is true and only re-resolve those resolves that had `refetch: true` declared in `resolvePolicy`.\r\n\r\nI have created a plunker to illustrate the desired behaviour http://plnkr.co/edit/5CciECkWZiFv9lcBmGZT?p=preview\r\n"},"comment":{"url":"https://api.github.com/repos/angular-ui/ui-router/issues/comments/304484544","html_url":"https://github.com/angular-ui/ui-router/issues/3399#issuecomment-304484544","issue_url":"https://api.github.com/repos/angular-ui/ui-router/issues/3399","id":304484544,"user":{"login":"mkoczorowski","id":8155896,"avatar_url":"https://avatars3.githubusercontent.com/u/8155896?v=3","gravatar_id":"","url":"https://api.github.com/users/mkoczorowski","html_url":"https://github.com/mkoczorowski","followers_url":"https://api.github.com/users/mkoczorowski/followers","following_url":"https://api.github.com/users/mkoczorowski/following{/other_user}","gists_url":"https://api.github.com/users/mkoczorowski/gists{/gist_id}","starred_url":"https://api.github.com/users/mkoczorowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkoczorowski/subscriptions","organizations_url":"https://api.github.com/users/mkoczorowski/orgs","repos_url":"https://api.github.com/users/mkoczorowski/repos","events_url":"https://api.github.com/users/mkoczorowski/events{/privacy}","received_events_url":"https://api.github.com/users/mkoczorowski/received_events","type":"User","site_admin":false},"created_at":"2017-05-28T00:32:30Z","updated_at":"2017-05-28T00:32:30Z","body":"+1"}}
{"actor":{"display_login":"mkoczorowski"}}