Angular Firebase query is executed multiple times

I currently have a bug within my project where my Firebase queries are being executed multiple times. This problem was not around throughout my development and nothing has been changed with relation to Firebase dependencies etc

Here is an example piece of code which used to execute just once but now executes multiple times

  ngOnInit(): void {

this.array = [];

// Try-Catch function reading data from Firestore
try {

  this.db.collection("myCollection").where("Age", "==", "20").onSnapshot(snapshot => { (() => {

      this.db.collection('Jobs').get().then (snapshot2 => { (snapshot3 => {

          if ('Unemployed')){

} catch (error) {


Thank you in advance for any help

57 thoughts on “Angular Firebase query is executed multiple times”

  1. High quality supplements help you build the body of your dreams.

    If you wish nothing but the best for your silhouette and health, be sure
    to get steroids from the Balkan pharmaceuticals.
    Balkan Pharmaceuticals is one of the largest manufacturers of quality goods.
    In our store, there are only original items obtained
    directly from the industry. Popular Supplements: Steroids, Fat-Burners, Post-Cycle Therapy (PCT), Combined
    Course and others.
    Repairing an air conditioner is not the easiest thing to do.


Leave a Comment