Skip to content
This repository has been archived by the owner on Feb 19, 2022. It is now read-only.

Commit

Permalink
new version with angular-google-gapi v 1.0.0-SNAPSHOT
Browse files Browse the repository at this point in the history
  • Loading branch information
maximepvrt committed Nov 1, 2015
1 parent c05be08 commit ce98a31
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
10 changes: 7 additions & 3 deletions app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ var app = angular.module('angular-google-api-example', [

]);

app.run(['GAuth', 'GApi', '$state', '$rootScope', '$window',
function(GAuth, GApi, $state, $rootScope, $window) {
app.run(['GAuth', 'GApi', 'GData', '$state', '$rootScope', '$window',
function(GAuth, GApi, GData, $state, $rootScope, $window) {

$rootScope.gdata = GData;

var CLIENT = '526374069175-4vv42arm0ksdr9a1lgkve6vbktfkmlvv.apps.googleusercontent.com';
var BASE;
Expand All @@ -19,6 +21,8 @@ app.run(['GAuth', 'GApi', '$state', '$rootScope', '$window',
BASE = 'https://cloud-endpoints-gae.appspot.com/_ah/api';
}

BASE = 'https://cloud-endpoints-gae.appspot.com/_ah/api';

GApi.load('myContactApi', 'v1', BASE);
GApi.load('calendar', 'v3');
GAuth.setClient(CLIENT);
Expand All @@ -40,4 +44,4 @@ app.run(['GAuth', 'GApi', '$state', '$rootScope', '$window',
});
};
}
]);
]);
4 changes: 3 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav navbar-right">
<li><a href="" ng-click="logout()">logout</a></li>
<li><a href="" ng-click="logout()">{{gdata.getUser().name}}</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
Expand All @@ -46,7 +47,8 @@
</div>
</footer>

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.4/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.4/angular-cookies.min.js"></script>
<script src="vendors/angular-ui-router.min.js"></script>
<script src="vendors/angular-google-gapi.min.js"></script>

Expand Down
5 changes: 2 additions & 3 deletions vendors/angular-google-gapi.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ce98a31

Please sign in to comment.