使用离子聊天应用程序的Firebase云消息传递

时间:2017-04-11 00:27:34

标签: angularjs firebase ionic-framework firebase-cloud-messaging cordova-plugin-fcm

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

Controller.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 

0 个答案:

没有答案