A simple and cool angular directive which interacts with OneDrive file pickers
http://geojacobm6.github.io/angular-onedrive-picker/
Download https://github.com/geojacobm6/angular-onedrive-picker/archive/master.zip
- Include script in html
<script src="onedrive-picker.js"></script>
For OneDrive:
```html
Don't forgot ot replace APP_ID with appkey which get from onedrive app console https://account.live.com/developers/applications
2. Include the onedrive-picker as a dependency for your app
angular.module('myApp', ['onedrive-picker'])
3. Configuration
for more details about options got https://dev.onedrive.com/sdk/javascript-picker-saver.htm
angular.module('OnedriveControllers', ['onedrive-picker'])
.config(['OneDriveSettingsProvider', function(OneDriveSettingsProvider) {
// Configure the options
OneDriveSettingsProvider.configure({
linkType: 'webViewLink',//or downloadLink
multiSelect: true,//or false
});
}])
4. Create scope to handle choosed files
.controller('OneDriveCtrl', ['$scope', 'OneDriveSettings', function($scope, OneDriveSettings) {
$scope.odfiles = [];
}]);
5. Add the directive to your HTML element
<a href="javascript:;" one-drive-picker odpicker-files="odfiles">OneDrive Picker</a
6. Done.