AUR0712
Template compilation error: Bindable property and attribute needs to be unique; found property: xxxx, attribute: yyyy
Last updated
Was this helpful?
Was this helpful?
<!-- my-component.html -->
<template>
<local-element message="Hi" data="Test"></local-element>
<template as-custom-element="local-element">
<!-- Error: Duplicate property name "message" -->
<bindable property="message"></bindable>
<bindable property="message"></bindable>
<!-- Error: Duplicate attribute name "data-attr" -->
<bindable property="data1" attribute="data-attr"></bindable>
<bindable property="data2" attribute="data-attr"></bindable>
<span>${message} ${data1} ${data2}</span>
</template>
</template><!-- my-component.html -->
<template>
<local-element message="Hi" data-value="Test"></local-element>
<template as-custom-element="local-element">
<!-- Correct: Unique property and attribute names -->
<bindable property="message"></bindable>
<bindable property="dataValue" attribute="data-value"></bindable>
<span>${message} ${dataValue}</span>
</template>
</template>