Accordion is not opening after binding data from API in Angular4

后端 未结 1 931
粉色の甜心
粉色の甜心 2020-12-07 06:56

Working in an Angular 4 application ,In this I have accordion inside accordion,Now I am trying to bind the accordion dynamically from API response (json).

Here in my

相关标签:
1条回答
  • 2020-12-07 07:05

    I am not fully aware of the exact goal you try to achieve, but in dynamic version you set data target - href="#collapseInnerTwo" and in id of collapsable you try to evaluate some expression - [id]="'collapseInnerTwo' + group?.CAMD_PRGRP_DESC"

    These will never match and never collapse. If you change

    [id]="'collapseInnerTwo' + group?.CAMD_PRGRP_DESC"

    To

    id="collapseInnerTwo"

    It works as supposed

    0 讨论(0)
提交回复
热议问题