We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Dynamic rowSpan in widget

HarshiniV
Tera Contributor

HTML:

 <table class="center" style="position: relative;
                             left: -320px; bottom: 23px; height: 156px;
                             width: 720px;">
       <tr>
          <th><center>GROUP</center></th>
          <th><center>LAB NAME</center></th>
          <th><center>ENGINEER(REQUESTED BY)</center></th>
          <th><center>REQUESTED DAYS</center></th>
        </tr>


    <tr ng-repeat="(key, value) in data.lab_req_data">
        <td [attr.rowspan]="2">{{ key }}</td>
        <td>
        <span ng-repeat="(subKey, subValue) in value" class = "line-separator">
            {{ subKey }} <br>
        </span>
         </td>
          <td >
            <span ng-repeat="(subKey, subValue) in value">
              <span ng-repeat="(name, count) in subValue"  class = "line-separator">
                {{ name }}<br>    
              </span>
            </span>
          </td>
          <td>
            <span ng-repeat="(subKey, subValue) in value">
              <span ng-repeat="(name, count) in subValue"  class = "line-separator">
                {{ count }}<br>
              </span>
            </span>
          </td>
        </tr>
      </table>

this is the sample json:

{
"group1": {
"lab name 1": {
"name 1": "5",
"name 2": "10"
},
"lab name 2": {
"name 1": "4"
},
"group2": {
"lab name 1": {
"name 1": "6"
}
}

i have to traverse through json, so i have used ng-repeat in span in my td. but i cant able to add dynamic rowspan. can someone help me to fix my issue.




0 REPLIES 0