我正在尝试将对讲机与Ionic 4集成。
我能找到的唯一文档是Ionic 3...https://ionicframework.com/docs/native/intercom/
我知道它是针对Ionic 3的,我使用的是Ionic 4,但这是我能找到的唯一文档。当我尝试实现它时,我得到了这个错误...
core.js:12501 ERROR Error: Uncaught (in promise): TypeError: Object(...) is not a function
TypeError: Object(...) is not a function
是不是还不能将对讲机与Ionic 4集成?以下是我的代码(简化)...
import { Component } from '@angular/core';
import { Intercom } from '@ionic-native/intercom';
@Component({
selector: 'app-home',
templateUrl: 'home.page.html',
styleUrls: ['home.page.scss'],
})
export class HomePage {
constructor(private intercom: Intercom) {
}
ShowIntercom() {
this.intercom.displayMessenger();
}
}
任何帮助都将不胜感激。
发布于 2019-03-05 11:52:15
当使用离子4和离子原生版本5及更高版本时,您需要使用"/ngx“导入它们。
import { Intercom } from '@ionic-native/intercom/ngx';
发布于 2021-03-12 18:43:32
当时没有。我们决定更换客户通信提供商(出于业务目的),所以不能再多说了。我不认为原始问题是特定于平台的。
https://stackoverflow.com/questions/54063440
复制相似问题