-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds Documentation for {{action}} Handlebars helper #689
Conversation
|
||
Clicking "click me" will trigger the `anActionName` method of the `aView` object with a | ||
`jQuery.Event` object as its argument. The `jQuery.Event` object will be extended to include | ||
a `view` property that is set to the original view interacted with (in this case the `aView` object). |
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.
There is also a context
property which is the templateContext. This is especially helpful in cases of #each
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.
What's it set to? I don't think I've ever had one I've used set to anything other than the view.
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.
It's set to the context when the template is rendered, see http://jsfiddle.net/pangratz666/Snd6n/
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.
Does it occur other than with {{each}}? I almost always end up with {{collection}} instead.
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.
I guess the better question would be "when is context not the view?" Is it when the view itself has a content
?
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.
I have almost always used each
so I can't tell the behavior of it when using collection
. But in my example the view
and context
are different. If a Ember.View
is added inside the each
, the view
and context
are the same...
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.
Yeah. Trying to distill down to a documentable rule.
It sounds like there may be more detail to add. However, since I don't think any of this is wrong, I'm going to go ahead and pull this in. If either of you wants to add more details later I'll gladly accept another PR. |
Adds Documentation for {{action}} Handlebars helper
…rn/ember-set-body-class-1.0.1 Bump ember-set-body-class from 0.4.2 to 1.0.1
No description provided.