Angular 7:TypeError: Class constructor Observable cannot be invoked without 'new'

后端 未结 2 617
日久生厌
日久生厌 2021-01-21 16:17
this.db.object(\'/users/\'+user.uid).update({
  name:user.displayName,email:user.email
  });
}

getting this error :

core.j         


        
2条回答
  •  北海茫月
    2021-01-21 16:27

    Go to tsconfig.json,

    Change the target from es2015 to es5.

    This worked for me.

    I think the compiler is still having issues when you use the AngularFire Database methods, I am not 100% sure of the cause, but changing the target solved the issue immediately and my user field was easily created in the DataBase

提交回复
热议问题