{"action":"created","issue":{"url":"https://api.github.com/repos/michaelbromley/angularUtils/issues/193","labels_url":"https://api.github.com/repos/michaelbromley/angularUtils/issues/193/labels{/name}","comments_url":"https://api.github.com/repos/michaelbromley/angularUtils/issues/193/comments","events_url":"https://api.github.com/repos/michaelbromley/angularUtils/issues/193/events","html_url":"https://github.com/michaelbromley/angularUtils/issues/193","id":94868293,"number":193,"title":"page changed function called twice","user":{"login":"NetanelBasal","id":6745730,"avatar_url":"https://avatars.githubusercontent.com/u/6745730?v=3","gravatar_id":"","url":"https://api.github.com/users/NetanelBasal","html_url":"https://github.com/NetanelBasal","followers_url":"https://api.github.com/users/NetanelBasal/followers","following_url":"https://api.github.com/users/NetanelBasal/following{/other_user}","gists_url":"https://api.github.com/users/NetanelBasal/gists{/gist_id}","starred_url":"https://api.github.com/users/NetanelBasal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NetanelBasal/subscriptions","organizations_url":"https://api.github.com/users/NetanelBasal/orgs","repos_url":"https://api.github.com/users/NetanelBasal/repos","events_url":"https://api.github.com/users/NetanelBasal/events{/privacy}","received_events_url":"https://api.github.com/users/NetanelBasal/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-07-14T04:57:14Z","updated_at":"2015-07-15T14:45:14Z","closed_at":null,"body":"my situation is like this:\r\n\r\n1. i have a top filters - when i click on filter i am requesting the new filtered data by call to getData and update  this.FeedService.page = 1 and update the pagination info and the current page.\r\n\r\n2. after phase 1 when the numbers of pages in pagination dir change and i click on page 2 for example, the on page change is called twice and i dont understand why this is happening, i am trying to debug this all day and its seems something from the plugin itself.\r\n\r\n```html\r\n <card\r\n            dir-paginate=\"card in feedCards.FeedService.feed | itemsPerPage: feedCards.FeedService.pagination.items_per_page\"\r\n            total-items=\"feedCards.FeedService.pagination.total_items\"\r\n            pagination-id=\"feedFilter\"></card>\r\n\r\n  <dir-pagination-controls on-page-change=\"feedCards.pageChanged(newPageNumber)\" pagination-id=\"feedFilter\"\r\n                                     boundary-links=\"true\"></dir-pagination-controls>\r\n```\r\n\r\nOn filter click:\r\n\r\n```javascript\r\n    this.FeedService.page = 1;\r\n    this.SkillsFiltersService.getData();\r\n```\r\n\r\nOn page change function:\r\n\r\n```javascript\r\npageChanged( page ) {\r\n   console.log('pageChanged');\r\n   this.FeedService.page = page;\r\n   this.SkillsFiltersService.getData();\r\n\r\n  }\r\n```\r\n\r\ngetData function:\r\n\r\n```javascript\r\n\r\n    this.$http.get(this.appConfig.api.learning).then(( res ) => {\r\n      this.FeedService.feed = res.data.resources;\r\n      this.FeedService.pagination = res.data.control;\r\n      this.paginationService.setCurrentPage('feedFilter', this.FeedService.page);\r\n    });\r\n```"},"comment":{"url":"https://api.github.com/repos/michaelbromley/angularUtils/issues/comments/121638401","html_url":"https://github.com/michaelbromley/angularUtils/issues/193#issuecomment-121638401","issue_url":"https://api.github.com/repos/michaelbromley/angularUtils/issues/193","id":121638401,"user":{"login":"NetanelBasal","id":6745730,"avatar_url":"https://avatars.githubusercontent.com/u/6745730?v=3","gravatar_id":"","url":"https://api.github.com/users/NetanelBasal","html_url":"https://github.com/NetanelBasal","followers_url":"https://api.github.com/users/NetanelBasal/followers","following_url":"https://api.github.com/users/NetanelBasal/following{/other_user}","gists_url":"https://api.github.com/users/NetanelBasal/gists{/gist_id}","starred_url":"https://api.github.com/users/NetanelBasal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NetanelBasal/subscriptions","organizations_url":"https://api.github.com/users/NetanelBasal/orgs","repos_url":"https://api.github.com/users/NetanelBasal/repos","events_url":"https://api.github.com/users/NetanelBasal/events{/privacy}","received_events_url":"https://api.github.com/users/NetanelBasal/received_events","type":"User","site_admin":false},"created_at":"2015-07-15T14:45:14Z","updated_at":"2015-07-15T14:45:14Z","body":"And now i see its happening when i update the:\r\n```javascript\r\nthis.FeedService.feed = res.data.resources;\r\nthis.FeedService.pagination = res.data.control;\r\n```\r\n\r\nafter the xhr.\r\n"}}