Created
April 16, 2013 19:15
-
-
Save arnaudbreton/5398733 to your computer and use it in GitHub Desktop.
AngularJS Share controller invoking drive-share
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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