Skip to content
This repository has been archived by the owner on Feb 19, 2022. It is now read-only.

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
maximepvrt committed Nov 26, 2014
1 parent 10deee0 commit 04a1b38
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,10 @@ app.run(['GAuth', 'GApi', '$state',
```javascript
app.controller('myController', ['$scope', 'GApi',
function myController($scope, GApi) {
GApi.execute('youApi', 'you.api.method.name', function(resp) {
GApi.execute('youApi', 'you.api.method.name').then( function(resp) {
$scope.value = resp;
}, function() {
console.log("error :(");
});
}
]);
Expand All @@ -84,8 +86,10 @@ app.controller('myController', ['$scope', 'GApi',
```javascript
app.controller('myController', ['$scope', 'GApi',
function myController($scope, GApi) {
GApi.execute('youApi', 'you.api.method.name', {parm1: value}, function(resp) {
GApi.execute('youApi', 'you.api.method.name', {parm1: value}).then( function(resp) {
$scope.value = resp;
}, function() {
console.log("error :(");
});
}
]);
Expand All @@ -96,8 +100,10 @@ app.controller('myController', ['$scope', 'GApi',
```javascript
app.controller('myController', ['$scope', 'GApi',
function myController($scope, GApi) {
GApi.executeAuth('youApi', 'you.api.method.name', function(resp) {
GApi.executeAuth('youApi', 'you.api.method.name').then( function(resp) {
$scope.value = resp;
}, function() {
console.log("error :(");
});
}
]);
Expand All @@ -108,8 +114,10 @@ app.controller('myController', ['$scope', 'GApi',
```javascript
app.controller('myController', ['$scope', 'GApi',
function myController($scope, GApi) {
GApi.executeAuth('youApi', 'you.api.method.name', {parm1: value}, function(resp) {
GApi.executeAuth('youApi', 'you.api.method.name', {parm1: value}).then( function(resp) {
$scope.value = resp;
}, function() {
console.log("error :(");
});
}
]);
Expand Down

0 comments on commit 04a1b38

Please sign in to comment.