{"action":"created","issue":{"url":"https://api.github.com/repos/michaelbromley/angularUtils/issues/294","repository_url":"https://api.github.com/repos/michaelbromley/angularUtils","labels_url":"https://api.github.com/repos/michaelbromley/angularUtils/issues/294/labels{/name}","comments_url":"https://api.github.com/repos/michaelbromley/angularUtils/issues/294/comments","events_url":"https://api.github.com/repos/michaelbromley/angularUtils/issues/294/events","html_url":"https://github.com/michaelbromley/angularUtils/issues/294","id":133443533,"number":294,"title":"Current Page Not Resetting","user":{"login":"ewaschen","id":9055167,"avatar_url":"https://avatars.githubusercontent.com/u/9055167?v=3","gravatar_id":"","url":"https://api.github.com/users/ewaschen","html_url":"https://github.com/ewaschen","followers_url":"https://api.github.com/users/ewaschen/followers","following_url":"https://api.github.com/users/ewaschen/following{/other_user}","gists_url":"https://api.github.com/users/ewaschen/gists{/gist_id}","starred_url":"https://api.github.com/users/ewaschen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ewaschen/subscriptions","organizations_url":"https://api.github.com/users/ewaschen/orgs","repos_url":"https://api.github.com/users/ewaschen/repos","events_url":"https://api.github.com/users/ewaschen/events{/privacy}","received_events_url":"https://api.github.com/users/ewaschen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-13T15:52:42Z","updated_at":"2016-02-24T13:46:59Z","closed_at":null,"body":"Hi, When I do a search and load the data, I click to a different page, everything is working fine but when I do a new search the page does not go back to 1.  In my code I have \r\n`current-page=\"currentPage\"` and when I do a new search I set `$scope.currentPage=1`.  This doesn't reset the page.  I looked into the scope and found \r\n![cp](https://cloud.githubusercontent.com/assets/9055167/13028535/b7c380ce-d23f-11e5-947c-1a7d4ea29fbb.png).  It seems the pagination is reading from pagination.current and not from my variable even though I defined it in the html.\r\n\r\nThanks\r\n"},"comment":{"url":"https://api.github.com/repos/michaelbromley/angularUtils/issues/comments/188261749","html_url":"https://github.com/michaelbromley/angularUtils/issues/294#issuecomment-188261749","issue_url":"https://api.github.com/repos/michaelbromley/angularUtils/issues/294","id":188261749,"user":{"login":"ewaschen","id":9055167,"avatar_url":"https://avatars.githubusercontent.com/u/9055167?v=3","gravatar_id":"","url":"https://api.github.com/users/ewaschen","html_url":"https://github.com/ewaschen","followers_url":"https://api.github.com/users/ewaschen/followers","following_url":"https://api.github.com/users/ewaschen/following{/other_user}","gists_url":"https://api.github.com/users/ewaschen/gists{/gist_id}","starred_url":"https://api.github.com/users/ewaschen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ewaschen/subscriptions","organizations_url":"https://api.github.com/users/ewaschen/orgs","repos_url":"https://api.github.com/users/ewaschen/repos","events_url":"https://api.github.com/users/ewaschen/events{/privacy}","received_events_url":"https://api.github.com/users/ewaschen/received_events","type":"User","site_admin":false},"created_at":"2016-02-24T13:46:59Z","updated_at":"2016-02-24T13:46:59Z","body":"Hi, controller code is large but here is the important stuff\r\n\r\n```\r\nangular.module('gaegenericapp')\r\n  .controller('TrainingCtrl', ['$rootScope','$scope','$location','$window','$filter','$routeParams','$http','$popover','KeywordService','CoursesService','CoursesSearch','UserSearchQueryService',\r\n      function ($rootScope,$scope,$location,$window,$filter,$routeParams,$http,$popover,KeywordService,CoursesService,CoursesSearch,UserSearchQueryService) {\r\n\t$scope.signOnURL = \"\";\r\n\t$scope.skillsoftList = [];\r\n\t$scope.typesList = [];\r\n\t$scope.showSkillSoftResultLength = false;\r\n\t$scope.currentPage = 1;\r\n\t$scope.pageSize = 15;\r\n\t$scope.totalResults = 0;\r\n```\r\n\r\n```\r\nfunction runSearch(url, searchType){\r\n\t\t$scope.skillsoftList = []; // Reset Results\r\n\t\t$http.post(url,{}).then(function(skillsoftSearchResult){\r\n                      if(...){...}\r\n                      else{\r\n                      ...\r\n                                   if(searchType != \"Pagination\"){\r\n\t\t\t\t\t\t$scope.showSkillSoftPage = true;\r\n\t\t\t\t\t\t$scope.basicSearch = false;\r\n\t\t\t\t\t\t$scope.currentPage = 1;\r\n\t\t\t\t\t}\r\n                      }\r\n```\r\n\r\nSo right when the controller opens I set currentPage then in my http request I set the current page again if the search Type is not pagination (search button was clicked).  I'll try the update your source code and see if that helps"}}