angularjs - Why does AngularFire $remove reload the controller? -


in angular app have table 'contacts', loading contacts firebase database, using angularfire. i'm trying build in uibootstrap pagination directive (http://angular-ui.github.io/bootstrap/#/pagination).

in contactsctrl set $scope.currentpage = 1; updated when clicked on pagination link, works fine. when delete 1 of contacts following code (this happens in contacts service, btw) contactsctrl reloads, inital $scope.currentpage gets reset , i'm taking page 1 of contacts.

$firebase(new firebase(url).$remove(contactid); 

i'm not looking complete solution - i'm trying understand why $remove causes controller reload better understanding of angular , firebase. in angularfire api docs didn't find on question.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -