1

我正在使用 ionic 框架开发 android/ios 聊天应用程序,我想在新的 firebase 功能 FCM 的帮助下添加推送通知。使用此插件https://github.com/fechanique/cordova-plugin-fcm的简单推送通知工作正常,但现在我想向另一台设备发送消息它在应用程序中是如何工作的。当我在 App.js 中编写 FCMPlugin 时,会遇到很多错误。

控制器.js

angular.module('starter', ['ionic', 'FCMPlugin', 'intlpnIonic', 'ionic-material', 'ngStorage', 'ngCordovaOauth', 'firebase', 'ngCordova'])

错误

  ionic.bundle.js:13438 Uncaught Error: [$injector:modulerr] Failed to instantiate module starter due to:
Error: [$injector:modulerr] Failed to instantiate module FCMPlugin due to:
Error: [$injector:nomod] Module 'FCMPlugin' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
http://errors.angularjs.org/1.5.3/$injector/nomod?p0=FCMPlugin
    at http://192.168.15.34:8100/lib/ionic/js/ionic.bundle.js:13438:12
    at http://192.168.15.34:8100/lib/ionic/js/ionic.bundle.js:15404:17
    at ensure 
4

0 回答 0