Skip to content

Angular module which handles the login with the Google+ API

License

Notifications You must be signed in to change notification settings

ptitmouton/angular-google-plus

 
 

Repository files navigation

angular-google-plus

Build Status npm version Bower version

A angular module which handles the login with the Google+ API

Demo

Try this demo. Remind that there is no API Key and Client ID inserted

Install

Install the angular module with bower or npm.

$ bower install angular-google-plus
$ npm install angular-google-plus

Usage

var app = angular.module('app', ['googleplus']);

app.config(['GooglePlusProvider', function(GooglePlusProvider) {
     GooglePlusProvider.init({
        clientId: 'YOUR_CLIENT_ID',
        apiKey: 'YOUR_API_KEY'
     });
}]);

app.controller('AuthCtrl', ['$scope', 'GooglePlus', function ($scope, GooglePlus) {
    $scope.login = function () {
        GooglePlus.login().then(function (authResult) {
            console.log(authResult);

            GooglePlus.getUser().then(function (user) {
                console.log(user);
            });
        }, function (err) {
            console.log(err);
        });
    };
}]);

Credits

About

Angular module which handles the login with the Google+ API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 86.2%
  • HTML 13.8%