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 found the problem: the decorator function is executed after var fn = compile(template, options) but before var output = fn(context), therefore the context is not known when the decorator function runs.
The decorator argument options.args refers to the parent block, therefore if you place your decorator inside a child block, it will work. See also this question on StackOverflow.
Hope this helps.
Decorators seem to only accept literal arguments. If trying to pass property or sub expression they receive
undefined
or just fail, respectively.jsfiddle (better if developer console is open)
The text was updated successfully, but these errors were encountered: