I am trying to create a child component where the parent passes a prop and then the child computes several id's based on the passed prop. So far the only way I have managed to do it is by doing a computed property for each of the ids. I am sure there has to be an easier way to do it directly in the template.
For example the parent:
<Dates id="secondary_school" />
the Dates component:
<template>
<div :id="{{id}}_container">
<div :id="{{id}}_timeline">
<input :id="{{id}}_school_name" />
...
</div>
</div>
</template>
I know I cannot use squiggly brackets because Vue will complain about interpolation but if I do not use them then it doesn't find the prop being passed.
Would it be possible to have something similar to:
<template>
<div :id="id" + "_container">
<div :id="id" + "_timeline">
<input :id="id" + "_school_name" />
...
</div>
</div>
</template>