I am using bootstrap3-dialog in my Aurelia project, so, theres a way to compile template in view-model? like
export class MyComponent {
...
showMyDialog() {
bootstrapDialog.show({
title: 'My title',
message: `
<select class="form-control" style="width: 100%;" select2.bind="{placeholder: '-- select an option --'}">
<option></option>
<option value="1">First value</option>
<option value="2">Second value</option>
</select>
`,
buttons: [{
label: 'Cancel',
action: (dialog) => {
dialog.close();
}
}, {
label: 'OK',
cssClass: 'btn-primary',
action: (dialog) => {
this.doMyThing();
dialog.close();
}
}]
});
}
...
}
the message param has a custom attribute select2, but in this code has no effect