简体   繁体   English

TypeError:无法使用AngularJs读取IONIC中未定义的属性'googleplus'

[英]TypeError: Cannot read property 'googleplus' of undefined in IONIC with AngularJs

I've been following these links to use social login in my hybrid app. 我一直在关注这些链接,在我的混合应用程序中使用社交登录。

https://github.com/EddyVerbruggen/cordova-plugin-googleplus https://github.com/EddyVerbruggen/cordova-plugin-googleplus

https://ionicthemes.com/tutorials/about/google-plus-login-with-ionic-framework https://ionicthemes.com/tutorials/about/google-plus-login-with-ionic-framework

I've created all the google developer id's and all that stuff. 我创建了所有谷歌开发者ID和所有这些东西。 I've installed the cordova-plugin-googleplus using those two as they said. 正如他们所说,我已经使用这两个安装了cordova-plugin-googleplus。 But still my application showing the error i mentioned as header of this message... 但仍然我的应用程序显示我提到的错误作为此消息的标题...

In this line: window.plugins.googleplus.login( 在这一行:window.plugins.googleplus.login(

So, please help me with this one... I've stuck on this for 2 dayzz...Any help will be appreciated. 所以,请帮助我这个...我已经坚持这2天了...任何帮助将不胜感激。

Here below is an example of cordova plugins check in the $ionicPlatform.ready() function wrapper: 下面是$ionicPlatform.ready()函数包装器中的cordova插件检查示例:

mainApp.run(["$ionicPlatform", "$window", function ($ionicPlatform, $window) {

    $ionicPlatform.ready(function () {
        if ($window.plugins && $window.plugins.googleplus) {
            $window.plugins.googleplus.isAvailable(
                function (available) {
                if (available) {
                    // show the Google+ sign-in button
                }
            });
        }
    ...

    }

PS: $window is an Angular wrapper for window PS: $window是一个角包装window

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Angularjs / Ionic TypeError:无法读取未定义的属性'then' - Angularjs/Ionic TypeError: Cannot read property 'then' of undefined 使用 AngularJS 和 Ionic 出现错误“TypeError:无法读取未定义的属性‘email’” - Error "TypeError: Cannot read property 'email' of undefined" using AngularJS and Ionic Ionic:TypeError:无法读取未定义的属性“ ready” - Ionic: TypeError: Cannot read property 'ready' of undefined 无法读取 AngularJS Ionic 中未定义的属性数据传输 - Cannot read property dataTransfer of undefined in AngularJS Ionic AngularJs:TypeError:无法读取未定义的属性“控制器” - AngularJs: TypeError: Cannot read property 'controller' of undefined TypeError:无法读取未定义的AngularJS的属性“ unshift” - TypeError: Cannot read property 'unshift' of undefined AngularJS TypeError:无法读取Angular.js中未定义的属性“ 0” - TypeError: Cannot read property '0' of undefined in Angularjs AngularJS-TypeError:无法读取未定义的属性“ canonicalUrl” - AngularJS - TypeError: Cannot read property 'canonicalUrl' of undefined AngularJS + JQuery = TypeError:无法读取未定义的属性“ then” - AngularJS + JQuery = TypeError: Cannot read property 'then' of undefined AngularJS和Restangular:TypeError:无法读取未定义的属性“ then” - AngularJS and Restangular: TypeError: Cannot read property 'then' of undefined
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM