Skip to content

Commit 3c5b036

Browse files
committed
return promise example
1 parent fb4de11 commit 3c5b036

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@ wp-api-angularjs is based on Restangular therefore you can use any of the [Resta
1616
});
1717
```
1818

19+
wp-api-angularjs always returns promises:
20+
21+
```
22+
$wpApiPosts.$get(id).then(function(post) {
23+
// OK
24+
}).catch(function() {
25+
// KO
26+
});
27+
```
28+
1929
### Posts ```$wpApiPosts```
2030

2131
```

0 commit comments

Comments
 (0)