Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/firebase/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Firebase AngularFire HttpScalable对象(…)不是函数_Firebase_Google Cloud Functions_Angularfire2 - Fatal编程技术网

Firebase AngularFire HttpScalable对象(…)不是函数

Firebase AngularFire HttpScalable对象(…)不是函数,firebase,google-cloud-functions,angularfire2,Firebase,Google Cloud Functions,Angularfire2,我想在我的Ionic 3应用程序中调用HttpScalable函数。我正在尝试遵循以下文档: 我试过: const newGame = (firebase as any).functions().httpsCallable('findCreateGame'); newGame({}).then(function(result) { console.log("In here."); }); 这导致: 错误类型错误:WEBPACK\u IMPORTED\u MODU

我想在我的Ionic 3应用程序中调用HttpScalable函数。我正在尝试遵循以下文档:

我试过:

const newGame = (firebase as any).functions().httpsCallable('findCreateGame');
    newGame({}).then(function(result) {
        console.log("In here.");
    });
这导致:

错误类型错误:WEBPACK\u IMPORTED\u MODULE\u 5\u firebase\u函数。函数不是函数

我还在angularfire中尝试了新实现的包装器:

const newGame = this.afFunctions.httpsCallable('findCreateGame');
    newGame({}).then(function(result) {
        console.log("In here.");
    });
错误类型错误:对象(…)不是函数

有人有过这方面的经验吗?这里是添加功能的请求,如果这有帮助的话

编辑---

此代码实际上调用云函数,即使它抛出相同的“nota function”错误:

const newGame = this.afFunctions.httpsCallable('findCreateGame');
newGame();
我不知道如何调用函数,即使
newGame
是一个对象而不是函数引用。

抛出
对象(…)不是函数,因为您运行的是rxjs 5,而不是6

如果升级,该功能将按预期执行


有关5和6之间更改的更多详细信息,请参阅。

在第一个示例中,确保在调用函数的ts文件中导入
导入“firebase/functions”