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
If an alias is created {{#with reference as alias}}, it should be reachable within an event handler that is fired not only by a standart HTML elements, but also by a component: Playground
If we change
alert('filename is: ' + ctx.get('filename'))
to
alert('filename is: ' + ctx.get('@key'))
it starts working but this introduces extra complexity because
this filename alias would have to be calculated twice
filename alias might be a very long expression which would cause opening the door of bugs when exact same calculation is maintained in two different locations (one in the template, other in the js file)
Versions affected:
0.9.13
The text was updated successfully, but these errors were encountered:
I think that the latter behavior is arguably the bug. If you want access to data, in this case @key, which only exists in the template outside of the component, you would need to disable isolation. That would be much more consistent with what isolation is about - not letting stuff from outside of the component leak in.
Perhaps a solution to this could be to add different levels of isolation e.g. data, plugin, context, etc? true and false could remain the switch for wholesale enabling and disabling all of them.
Description:
If an alias is created
{{#with reference as alias}}
, it should be reachable within an event handler that is fired not only by a standart HTML elements, but also by a component: PlaygroundIf we change
to
it starts working but this introduces extra complexity because
filename
alias would have to be calculated twicefilename
alias might be a very long expression which would cause opening the door of bugs when exact same calculation is maintained in two different locations (one in the template, other in the js file)Versions affected:
0.9.13
The text was updated successfully, but these errors were encountered: