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

后端 未结 2 616
日久生厌
日久生厌 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

    0 讨论(0)
  • 2021-01-21 16:39

    change TARGET in TSCONFIG.JSON from es2015 to es5 and then recompile with ng serve

    0 讨论(0)
提交回复
热议问题