{"action":"created","issue":{"url":"https://api.github.com/repos/finnsson/pagerjs/issues/169","labels_url":"https://api.github.com/repos/finnsson/pagerjs/issues/169/labels{/name}","comments_url":"https://api.github.com/repos/finnsson/pagerjs/issues/169/comments","events_url":"https://api.github.com/repos/finnsson/pagerjs/issues/169/events","html_url":"https://github.com/finnsson/pagerjs/pull/169","id":28845418,"number":169,"title":"Lazy load view model - VM should load before showing","user":{"login":"CuinnWylie","id":616567,"avatar_url":"https://avatars.githubusercontent.com/u/616567?v=3","gravatar_id":"","url":"https://api.github.com/users/CuinnWylie","html_url":"https://github.com/CuinnWylie","followers_url":"https://api.github.com/users/CuinnWylie/followers","following_url":"https://api.github.com/users/CuinnWylie/following{/other_user}","gists_url":"https://api.github.com/users/CuinnWylie/gists{/gist_id}","starred_url":"https://api.github.com/users/CuinnWylie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CuinnWylie/subscriptions","organizations_url":"https://api.github.com/users/CuinnWylie/orgs","repos_url":"https://api.github.com/users/CuinnWylie/repos","events_url":"https://api.github.com/users/CuinnWylie/events{/privacy}","received_events_url":"https://api.github.com/users/CuinnWylie/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/finnsson/pagerjs/milestones/7","html_url":"https://github.com/finnsson/pagerjs/milestones/1.1","labels_url":"https://api.github.com/repos/finnsson/pagerjs/milestones/7/labels","id":513269,"number":7,"title":"1.1","description":"Adding minor features to 1.0","creator":{"login":"finnsson","id":96008,"avatar_url":"https://avatars.githubusercontent.com/u/96008?v=3","gravatar_id":"","url":"https://api.github.com/users/finnsson","html_url":"https://github.com/finnsson","followers_url":"https://api.github.com/users/finnsson/followers","following_url":"https://api.github.com/users/finnsson/following{/other_user}","gists_url":"https://api.github.com/users/finnsson/gists{/gist_id}","starred_url":"https://api.github.com/users/finnsson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/finnsson/subscriptions","organizations_url":"https://api.github.com/users/finnsson/orgs","repos_url":"https://api.github.com/users/finnsson/repos","events_url":"https://api.github.com/users/finnsson/events{/privacy}","received_events_url":"https://api.github.com/users/finnsson/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":4,"state":"open","created_at":"2013-12-14T09:20:59Z","updated_at":"2014-04-23T19:46:37Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2014-03-06T02:33:33Z","updated_at":"2015-11-25T12:55:34Z","closed_at":"2014-04-23T19:45:58Z","pull_request":{"url":"https://api.github.com/repos/finnsson/pagerjs/pulls/169","html_url":"https://github.com/finnsson/pagerjs/pull/169","diff_url":"https://github.com/finnsson/pagerjs/pull/169.diff","patch_url":"https://github.com/finnsson/pagerjs/pull/169.patch"},"body":"I have modified pager to wait for the VM (if using withOnShow) before showing the page.  The seems to better fit with the way that sourceOnShow works without requiring new events.\r\n\r\nThis allows for an initial VM setup when the VM is loaded and then a VM refresh during the shown events if caching. I have been using this for a while in my projects but forgot about it until the question came up in issue #166.\r\n\r\nIn my projects I have a function inside my VM that I query from the page model in the afterShown event that I use for refreshing data in my model.  This way I don't have to globally track my model if I want to keep it all modular.\r\n\r\nAs always feel free to tell me I'm crazy and let me know how I should be doing this."},"comment":{"url":"https://api.github.com/repos/finnsson/pagerjs/issues/comments/159599690","html_url":"https://github.com/finnsson/pagerjs/pull/169#issuecomment-159599690","issue_url":"https://api.github.com/repos/finnsson/pagerjs/issues/169","id":159599690,"user":{"login":"vaibhav93","id":6007408,"avatar_url":"https://avatars.githubusercontent.com/u/6007408?v=3","gravatar_id":"","url":"https://api.github.com/users/vaibhav93","html_url":"https://github.com/vaibhav93","followers_url":"https://api.github.com/users/vaibhav93/followers","following_url":"https://api.github.com/users/vaibhav93/following{/other_user}","gists_url":"https://api.github.com/users/vaibhav93/gists{/gist_id}","starred_url":"https://api.github.com/users/vaibhav93/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vaibhav93/subscriptions","organizations_url":"https://api.github.com/users/vaibhav93/orgs","repos_url":"https://api.github.com/users/vaibhav93/repos","events_url":"https://api.github.com/users/vaibhav93/events{/privacy}","received_events_url":"https://api.github.com/users/vaibhav93/received_events","type":"User","site_admin":false},"created_at":"2015-11-25T12:55:34Z","updated_at":"2015-11-25T12:55:34Z","body":"Okay. Got it. dist folder does not have the latest pager.js compiled to minified version hence it does not include your merge. Used pager.js and it works flawlessly. Thanks"}}