Skip to content

Instantly share code, notes, and snippets.

@arnaudbreton
Created April 16, 2013 19:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arnaudbreton/5398733 to your computer and use it in GitHub Desktop.
Save arnaudbreton/5398733 to your computer and use it in GitHub Desktop.
AngularJS Share controller invoking drive-share
controllersModule.controller('ShareCtrl', ['$scope','appId','doc', function($scope, appId, doc) {
var client = new gapi.drive.share.ShareClient(appId);
$scope.enabled = function () {
return doc.info.id != null;
};
$scope.share = function () {
client.setItemIds([doc.info.id]);
client.showSettingsDialog();
}
}]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment