Does Aureliaoptional binding support ? I can not find this information anywhere. The problem I am facing is that I have an attribute titlethat may or may not be populated in an array of objects. I use repeat.forand title.bind, but I do not want the attribute to exist at all if this property is not part of an array of objects. Is this possible in Aurelia?
When used Bootstrap-Selectwith an empty one, titleit throws an error. If you Aureliacreate the attribute on the fly, this will solve my problem.
The code I still have is as follows:
<select class="selectpicker" value.bind="value" options.bind="options" disabled.bind="disabled">
<option repeat.for="option of options" model.bind="option"
data-subtext.bind="option.subtext"
title.bind="option.title">
${option.name}
</option>
In this example, I wanted to do data-subtext, and titleadditional attributes. Is this doable?
Since this is a user element, I tried to remove the property of titlemy object delete this.element.title, but this does not work. I also tried with jquery but again no luck.
source
share