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 would say this is a fairly serious limitation, seems nested loops or nested maps also have the same issue and the work around is not very apparent to me at the moment.
if i pass a struct into an amber template, i can't seem to access the variables inside of an iteration block:
let's say i have this struct:
type Foo struct {
ID string
OK bool
Bar []string
}
// initialized here
f = Foo{ID: "abc", OK: true, Bar: make([]string){"ddd", "eee"}}
passed into the template.Execute function:
template.Execute(w, f)
i can do the following without any issues:
h3 #{ID} // h3 abc
but if i do this:
each $i in Bar
h3 #{$i} // works fine
h3 #{ID} // causes an Amber Error <>: Unable to parse expression
exact error is:
Amber Error in <static/templates/viewteam.amber>: Unable to parse expression. - Line: 62, Column: 21, Length: 2
The text was updated successfully, but these errors were encountered: