diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1ed73085a47d..9ddc3c5fea08 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -23,7 +23,7 @@ discussion list or [StackOverflow][stackoverflow]. We are also available on [IRC ## Found an Issue? If you find a bug in the source code or a mistake in the documentation, you can help us by -submitting and issue to our [GitHub Repository][github]. Even better you can submit a Pull Request +submitting an issue to our [GitHub Repository][github]. Even better you can submit a Pull Request with a fix. ***Localization Issue:*** *Angular.js uses the [Google Closure I18N library], to generate its own I18N files. This means that diff --git a/src/ngResource/resource.js b/src/ngResource/resource.js index a4a59283c215..49cafeef20ed 100644 --- a/src/ngResource/resource.js +++ b/src/ngResource/resource.js @@ -239,10 +239,11 @@ function shallowClearAndCopy(src, dst) { // we can create an instance as well var newCard = new CreditCard({number:'0123'}); newCard.name = "Mike Smith"; - newCard.$save(); - // POST: /user/123/card {number:'0123', name:'Mike Smith'} - // server returns: {id:789, number:'0123', name: 'Mike Smith'}; - expect(newCard.id).toEqual(789); + newCard.$save().then(function() { + // POST: /user/123/card {number:'0123', name:'Mike Smith'} + // server returns: {id:789, number:'0123', name: 'Mike Smith'}; + expect(newCard.id).toEqual(789); + }); * ``` * * The object returned from this function execution is a resource "class" which has "static" method