As a newcomer, I am facing an issue with dynamically adding an id to my href tag.
Below is the code snippet:
<div class="col-md-6" v-for="Product in data">
<div class="panel panel-default" >
<div class="panel-heading">
{{ Product.name }}
</div>
<div class="panel-body" v-for = "Category in Product.Categories">
<div class="panel-group" id="accordion">
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<!--SEE HREF BELOW -->
<a data-toggle="collapse" data-parent="#accordion" href="#{{Category._id}}" >
{{ Category.name }}</a>
</h4>
</div>
<!-- SEE ID BELOW AS WELL -->
<div id="{{ Category._id }}" class="panel-collapse collapse">
<div class="panel-body"></div>
</div>
</div>
</div>
</div>
</div>
I am attempting to assign _id to the href attribute in
<a data-toggle="collapse" data-parent="#accordion" href="#{{Category._id}}">
, and using the same Id for the <div id="{{ Category._id }}" class="panel-collapse collapse">
tag mentioned above the href.
Any suggestions on how I can achieve this?
Thank you!