Skip to content

Commit 02496ca

Browse files
author
Loic Kartono
committed
Bump version 0.1.4
1 parent 2e5b541 commit 02496ca

File tree

3 files changed

+29
-10
lines changed

3 files changed

+29
-10
lines changed

README.md

+27-8
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
angular-google-picker
22
=====================
33

4-
Angular directive that interact with the Google API Picker :
4+
Angular directive that interact with the Google Picker API :
55
* [https://developers.google.com/picker/docs/](https://developers.google.com/picker/)
66
* [https://developers.google.com/picker/docs/](https://developers.google.com/picker/docs/)
77

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

2727
3. Manually
2828

29-
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)
29+
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)
3030

3131

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

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

102-
.config(['lkGoogleSettingsProvider', function(lkGoogleSettingsProvider) {
102+
.config(['lkGoogleSettingsProvider', function (lkGoogleSettingsProvider) {
103103

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

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

139-
.config(['lkGoogleSettingsProvider', function(lkGoogleSettingsProvider) {
139+
.config(['lkGoogleSettingsProvider', function (lkGoogleSettingsProvider) {
140140
lkGoogleSettingsProvider.views([
141141
'DocsUploadView()',
142142
'DocsView()'
143143
]);
144144
}])
145145
```
146146

147-
**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 :
147+
**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 :
148148

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

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

164164

165+
# Callback
166+
167+
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.
168+
169+
```js
170+
angular.module('myApp', ['lk-google-picker'])
171+
172+
.controller('ExampleCtrl', ['$scope', function ($scope) {
173+
$scope.afterSelectCallback = function (files) {
174+
// Do something
175+
}
176+
}]);
177+
```
178+
179+
```html
180+
<a href="javascript:;" lk-google-picker picker-files="files" after-select="afterSelectCallback(files)">Open my Google Drive</a>
181+
```
182+
183+
165184
# Example
166185

167186
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.

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-google-picker",
3-
"version": "0.1.3",
3+
"version": "0.1.4",
44
"authors": [
55
"Loic Kartono <[email protected]>"
66
],

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-google-picker",
3-
"version": "0.1.3",
3+
"version": "0.1.4",
44
"description": "An AngularJs directive that interact with the Google API Picker",
55
"author": "Loic Kartono <[email protected]> (http://www.kartono-loic.com)",
66
"devDependencies": {

0 commit comments

Comments
 (0)