{"action":"closed","issue":{"url":"https://api.github.com/repos/angular-ui/ui-calendar/issues/344","labels_url":"https://api.github.com/repos/angular-ui/ui-calendar/issues/344/labels{/name}","comments_url":"https://api.github.com/repos/angular-ui/ui-calendar/issues/344/comments","events_url":"https://api.github.com/repos/angular-ui/ui-calendar/issues/344/events","html_url":"https://github.com/angular-ui/ui-calendar/issues/344","id":116564390,"number":344,"title":"Problem with events added after initial load. ","user":{"login":"martinlong1978","id":303003,"avatar_url":"https://avatars.githubusercontent.com/u/303003?v=3","gravatar_id":"","url":"https://api.github.com/users/martinlong1978","html_url":"https://github.com/martinlong1978","followers_url":"https://api.github.com/users/martinlong1978/followers","following_url":"https://api.github.com/users/martinlong1978/following{/other_user}","gists_url":"https://api.github.com/users/martinlong1978/gists{/gist_id}","starred_url":"https://api.github.com/users/martinlong1978/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinlong1978/subscriptions","organizations_url":"https://api.github.com/users/martinlong1978/orgs","repos_url":"https://api.github.com/users/martinlong1978/repos","events_url":"https://api.github.com/users/martinlong1978/events{/privacy}","received_events_url":"https://api.github.com/users/martinlong1978/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-12T14:53:00Z","updated_at":"2015-11-12T15:00:52Z","closed_at":"2015-11-12T15:00:52Z","body":"This bug can be seen on the demo calendar hosted here: http://angular-ui.github.io/ui-calendar/ when using \"/* event source that contains custom events on the scope */\"\r\n\r\nEvents that are added to the array in the scope at the time the controller is constructed work fine, as expected. However, events that are added after this time (e.g. in response to an event or perhaps a promise such as a http load), will show, providing they are in view (current month). But as soon as they go out of view, they will disappear. \r\n\r\nTo reproduce, open up the demo page. Go forward and backward through the months, you will see that this works as expected. \r\n\r\nNow, while on the current month, click \"Add event\" a few times. You'll see the events appear on the calendar as expected. \r\n\r\nFinally, click back to last month, and then forward again. You'll see all of the original entries, however, the newly added ones have disappeared. \r\n\r\nIn my own application, I've worked around this by adding to the existing scope array but also returning a copy of that array in another function eventSource. So adding items to the scope array covers showing the items immediately after adding them, and the function handles redisplaying them after navigation. \r\n\r\nThis workaround is not ideal though. "}}