angular - 无法在 ionic 3 项目的模块中导入 google plus 插件
问题描述
我正在Hybrid
使用ionic-3
. 我在 app.module.ts 和 page.ts 中导入 google plus 插件时遇到了麻烦。我已经从下面的命令成功安装了 google plus 插件,但我第一次遇到这个问题。
$ ionic cordova plugin add cordova-plugin-googleplus --variable REVERSED_CLIENT_ID=myreversedclientid
$ npm install --save @ionic-native/google-plus
我的导入错误在下图中
应用模块.ts
页面.ts
离子信息
cli 包:(C:\Users\sandip\AppData\Roaming\npm\node_modules)
@ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
全局包:
cordova (Cordova CLI) : 6.4.0
本地包:
@ionic/app-scripts : 3.2.1
Cordova Platforms : none
Ionic Framework : ionic-angular 3.9.2
系统:
Node : v8.1.4
npm : 6.5.0
OS : Windows 8
环境变量:
ANDROID_HOME : E:\newsdk\newsdk\tools;E:\newsdk\newsdk\platform-tools;E:\newsdk\newsdk\build-tools
杂项:
backend : pro
我希望这些信息足以理解我的问题。
解决方案
尝试将其导入您正在工作的模块中:
import { GooglePlus } from '@ionic-native/google-plus/ngx'
@ngModule({
...
providers: [
...
GooglePlus
]
})
推荐阅读
- python - 某些形式是否禁止使用硒?
- php - 在 Mac OSX Mojave 10.14 上安装 pear 的问题
- laravel - 三向数据透视表获取用户所属的所有团队以及每个团队的角色
- bash - 如何在我的 bash 提示符中正确使用两个字符宽的表情符号?
- python - 创建静态列项
- r - R:记录链接问题,所有字段组合在 1 列中
- javascript - 使用带有 React JS 的箭头键递增和递减时获取重复项
- java - Apache HttpClient 5.0 HTTPS 代理:“没有隧道,除非连接”
- c - librdkafka C API Kafka Consumer 无法正确读取所有消息
- docusignapi - 品牌回调网址的签名是什么?