問題を引き起こしているミックスインがあります:
mixin dialog(title, description, choices)
form.choices.dialog.row
legend
h1 #{title}
p.description #{description}
fieldset
for choice in choices
label
input(type= "radio", name = "choice.name", checked = "checked", required = "required")
| choice.name
div.row.form-actions
button(type="submit", ) Make Choice
これを呼び出すには、まず、この mixin に mixin ファイルを含めます。
import dialog
次に、javascript 変数を作成した後、mixin を使用します。
- var investiageUFODialog = [{headerText: "Would you like to investiage the UFO?", description: "Choose whether or not to investigate the UFO."}, {choices: [{name: "Yes"}, {name: "No"}]}]
mixin dialog(investiageUFODialog.headerText, investiageUFODialog.description, investiageUFODialog.choices)
私は何を間違っていますか?