You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it would be useful to have something that:
A. Doesn't overwrite the entire this like #with does
B. Does add fields to the context (or if there are already fields with the same name, overwrites only those fields)
Because:
1- Having access to the field in a helper is cleaner than always tacking it on to the arg list:
{{helper}}
helper: ->
@foo
vs
{{helper foo}}
helper: (foo) ->
foo
2- I don't know how to access foo from an event.
The text was updated successfully, but these errors were encountered:
I was surprised to find that
#let
doesn't add to the data context:http://meteorpad.com/pad/GP54WkuYj9tdj7HrJ/Copy%20of%20Blank
I would expect to see
bar
on the page, but I get a blank page and an empty object logged to the console.I see that this is by design:
"it doesn't change the data context"
https://github.com/meteor/meteor/tree/devel/packages/spacebars#let
I think it would be useful to have something that:
A. Doesn't overwrite the entire
this
like#with
doesB. Does add fields to the context (or if there are already fields with the same name, overwrites only those fields)
Because:
1- Having access to the field in a helper is cleaner than always tacking it on to the arg list:
vs
2- I don't know how to access
foo
from an event.The text was updated successfully, but these errors were encountered: