我有一个表单助手 mixin,我将一个变量传递给:
mixin form-error(error)
if (typeof errors !== 'undefined' && errors.#{error})
.alert.alert-error.form-error
=errors.#{error}.msg
调用它并向它传递一个字符串:
mixin form_error('name')
但我得到:500 SyntaxError: Unexpected token ILLEGAL
errors.#{error}基本上我把所有东西都拿出来了,它很沮丧=errors.#{error}.msg
所以我不能#{error}在 a 之后使用.?