Skip to content

Commit

Permalink
Bump version 0.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Loic Kartono committed May 17, 2015
1 parent 2e5b541 commit 02496ca
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 10 deletions.
35 changes: 27 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
angular-google-picker
=====================

Angular directive that interact with the Google API Picker :
Angular directive that interact with the Google Picker API :
* [https://developers.google.com/picker/docs/](https://developers.google.com/picker/)
* [https://developers.google.com/picker/docs/](https://developers.google.com/picker/docs/)

Expand All @@ -26,7 +26,7 @@ Angular directive that interact with the Google API Picker :

3. Manually

Download [https://github.com/softmonkeyjapan/angular-google-picker/archive/0.1.3.zip](https://github.com/softmonkeyjapan/angular-google-picker/archive/0.1.3.zip)
Download [https://github.com/softmonkeyjapan/angular-google-picker/archive/0.1.4.zip](https://github.com/softmonkeyjapan/angular-google-picker/archive/0.1.4.zip)


# Usage
Expand All @@ -51,7 +51,7 @@ Download [https://github.com/softmonkeyjapan/angular-google-picker/archive/0.1.3
```js
angular.module('myApp', ['lk-google-picker'])

.controller('ExamplaCtrl', ['$scope', function($scope) {
.controller('ExampleCtrl', ['$scope', function ($scope) {
$scope.files = [];
}]);
```
Expand Down Expand Up @@ -99,7 +99,7 @@ In order to work, Google Picker needs to connect to the Google API using an appl
```js
angular.module('myApp', ['lk-google-picker'])

.config(['lkGoogleSettingsProvider', function(lkGoogleSettingsProvider) {
.config(['lkGoogleSettingsProvider', function (lkGoogleSettingsProvider) {

lkGoogleSettingsProvider.configure({
apiKey : 'YOUR_API_KEY',
Expand All @@ -119,7 +119,7 @@ The Picker use the concept of views and features that allow you to customize it.
```js
angular.module('myApp', ['lk-google-picker'])

.config(['lkGoogleSettingsProvider', function(lkGoogleSettingsProvider) {
.config(['lkGoogleSettingsProvider', function (lkGoogleSettingsProvider) {
lkGoogleSettingsProvider.features(['MULTISELECT_ENABLED', 'ANOTHER_ONE']);
}])
```
Expand All @@ -136,20 +136,20 @@ Views are objects that needs to be instanciate using the namespace `google.picke
```js
angular.module('myApp', ['lk-google-picker'])

.config(['lkGoogleSettingsProvider', function(lkGoogleSettingsProvider) {
.config(['lkGoogleSettingsProvider', function (lkGoogleSettingsProvider) {
lkGoogleSettingsProvider.views([
'DocsUploadView()',
'DocsView()'
]);
}])
```

**NOTE** : Views classes have some usefull methods such as `setIncludeFolders` or `setStarred` (or any other methods available). In order to use them, just chain them to the class :
**NOTE** : Views classes have some useful methods such as `setIncludeFolders` or `setStarred` (or any other methods available). In order to use them, just chain them to the class :

```js
angular.module('myApp', ['lk-google-picker'])

.config(['lkGoogleSettingsProvider', function(lkGoogleSettingsProvider) {
.config(['lkGoogleSettingsProvider', function (lkGoogleSettingsProvider) {
lkGoogleSettingsProvider.setViews([
'DocsUploadView().setIncludeFolders(true)',
'DocsView().setStarred(true)'
Expand All @@ -162,6 +162,25 @@ angular.module('myApp', ['lk-google-picker'])
Please refer to [https://developers.google.com/picker/docs/reference](https://developers.google.com/picker/docs/reference) for more informations.


# Callback

If you want to do some logic after selecting files from the picker, you can use the `after-select` attribute and pass it a function from the active scope.

```js
angular.module('myApp', ['lk-google-picker'])

.controller('ExampleCtrl', ['$scope', function ($scope) {
$scope.afterSelectCallback = function (files) {
// Do something
}
}]);
```

```html
<a href="javascript:;" lk-google-picker picker-files="files" after-select="afterSelectCallback(files)">Open my Google Drive</a>
```


# Example

The demo version available at [http://softmonkeyjapan.github.io/angular-google-picker/](http://softmonkeyjapan.github.io/angular-google-picker/) can be found in the `example` folder.
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-google-picker",
"version": "0.1.3",
"version": "0.1.4",
"authors": [
"Loic Kartono <contact@kartono-loic.com>"
],
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-google-picker",
"version": "0.1.3",
"version": "0.1.4",
"description": "An AngularJs directive that interact with the Google API Picker",
"author": "Loic Kartono <contact@kartono-loic.com> (http://www.kartono-loic.com)",
"devDependencies": {
Expand Down

0 comments on commit 02496ca

Please sign in to comment.