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
Post a Comment