So I have firebase database and mostly all screens is connected to firebase database. I have a page where I need to delete/add data from firebase database. The problem now is when I delete/add something it open the pages who I visited and connected to the firebase database on its own. its like a wild page jumping each pages I visited.
Does anyone experience this?? Please help!!!
Ionic Framework: ^3.6.0 Ionic App Scripts: 2.1.3 Angular Core: 4.1.2 Angular Compiler CLI: 4.1.2 Node: 6.9.4
This is possibly due to the callback feature of Firebase; every time theres a deletion/ updation, there's a callback your current page receives, which makes it rerun your code. Which again triggers a callback and this goes on forever.
To solve this, you need to ensure that the Firebase reference is made just once as shown below: