-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Conversation
Thanks for the PR! Please check the items below to help us merge this faster. See the contributing docs for more information.
If you need to make changes to your pull request, you can update the commit with Thanks again for your help! |
I'm sorry, but I wasn't able to verify your Contributor License Agreement (CLA) signature. CLA signature is required for any code contributions to AngularJS. Please sign our CLA and ensure that the CLA signature email address and the email address in this PR's commits match. If you signed the CLA as a corporation, please let us know the company's name. Thanks a bunch! PS: If you signed the CLA in the past then most likely the email addresses don't match. Please sign the CLA again or update the email address in the commit of this PR. |
I believe the code works as is, since It can be a bit confusing though, so I'll leave the PR open for someone to chip in. |
CLA signature verified! Thank you! Someone from the team will now triage your PR and it will be processed based on the determined priority (doc updates and fixes with tests are prioritized over other changes). |
Added sentence detailing why the success callback has access to the resource assigned in the request.
Interesting Rody. Thanks for chiming in. It wasn't clear to me how that was working, and looking at the example around 281 shows the same code, but passing the user into the callback. I reverted the original change, and added a sentence describing the behavior you lay out. |
@@ -191,7 +191,9 @@ function shallowClearAndCopy(src, dst) { | |||
* usually the resource is assigned to a model which is then rendered by the view. Having an empty | |||
* object results in no rendering, once the data arrives from the server then the object is | |||
* populated with the data and the view automatically re-renders itself showing the new data. This | |||
* means that in most cases one never has to write a callback function for the action methods. | |||
* means that in most cases one never has to write a callback function for the action methods. | |||
* Callbacks are evaluated in the same context as the initiating action method, providing access |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using the word "context" makes it seems as if the this
of the function will be the resource object, which is not the case.
Maybe this line can have the following added to it: [...] arguments, where the value is the resulting resource instance or collection object
?
02dc2aa
to
fd2d6c0
Compare
cad9560
to
f294244
Compare
e8dc429
to
e83fab9
Compare
4dd5a20
to
998c61c
Compare
http://screencast.com/t/xHi1XoYcTJ