I am trying to use requireJS with Google plus API, but getting an error when I click login button
Here is the error and screenshot:
GET
https://apis.google.com/_/scs/apps-static/_/js/k=oz.gapi.en.f5Li87Zolqg.O/m…sv=1/d=1/ed=1/am=AQ/RS=AGLTcCPR6xH_GlLdKZ8KMxaWNPWQokoYsg/cb=gapi.loaded_0
Screenshot: https://i.imgsafe.org/098c5b5634.png
And I am using this code:
gapi is not defined error comes when using with requirejs
Note: I am calling a gp.js inside a JavaScript file and defining it there here is the first line for it.
My screen.js file
define(["facebook","fb","googleplus","gp"], function(facebook,fb,gapi,gp){
// some bunch other code will go here
$('#login').click(login); …Run Code Online (Sandbox Code Playgroud)