I recently tried creating a custom component with a custom attribute following the guidance from this Vue documentation. Here is how I set it up:
Vue.component('y-form-checkbox', {
props: ['chkLabel'],
template: `<b-form-group label="label">
<b-form-checkbox>
{{ chkLabel }}
</b-form-checkbox>
</b-form-group>`
});
After setting up the component, I tried using it like this:
<y-form-checkbox chkLabel="Something special"></y-form-checkbox>
However, I encountered an issue where the chkLabel did not bind to the component's template as expected. Instead, I only saw a checkbox without a label. Can anyone advise on why this might be happening? Thank you in advance!