FCM getToken() doesn't return anything

♀尐吖头ヾ 提交于 2019-12-06 05:00:18

Ok I've found the solution. The problem came from the relation between the Angular-CLI and AngularFire2.

It's here.

I had to add the following in src/tsconfig.json and in src/typings.d.ts:

"types": [
  "firebase"
]

and

declare var require: any;
declare var module: any;

I hope this can help someone.

Thank you, Frank van Puffelen, for your help. You are always here to help on my firebase questions :)

EDIT I just found out that it does not work in all browser. It works in firefox but not in chrome... How come ?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!