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
This form, however, should be called let
There's no equivalent to this form in JS or VB, both of which support with.
Well, we don't need an equivalent in JS or VB and IMO it reads ok.
I would introduce a new tag called let that would allow users to specify a map, i.e. something like {#let myParent=item.parent count=item.count}. WDYT?
Ah, we actually already have the SetSectionHelper but it's not mentioned in the docs. I'll add the 'let' alias:
{! this works now !}
{#set myParent=item.parent count=item.count}
<h1>{count}: {myParent.name}</h1>
{/set}
{! we will add the "let" alias !}
{#let myParent=item.parent count=item.count}
<h1>{count}: {myParent.name}</h1>
{/let}
Err… OK, but I'm confused as to the syntax here. In the case of with we have as and here it's =. Why the difference? Also, aren't parameters separated with commas?
This is a
with
:It changes the default scope.
This form, however, should be called
let
:There's no equivalent to this form in JS or VB, both of which support
with
. Perhaps we could event support the following form?The text was updated successfully, but these errors were encountered: