title: Dynamic rowspan in angular
body: <p>Number of persons and their mobiles numbers are dynamic. I need to show this in table.</p>
  
  <p>Data can contain any number of pname and mobile numbers.</p>
  
  <pre><code>dataList = [
   {
    pname: "abc",
    numbers: [{mobile1: 123, mobile2: 234}]
   },
  {
    pname: "mno",
    numbers: [{mobile1: 125, mobile2: 237}]
   }
  ]
  </code></pre>
  
  <p>Template</p>
  
  <pre><code>&lt;tr *ngFor="let data of dataList"&gt;
   &lt;td  [attr.rowspan]="data.numbers.lenght"&gt;data.pname&lt;/td&gt;
   &lt;td&gt;data.numbers&lt;/td&gt; // Here how do I show all mobile numbers of the person.
  &lt;/tr&gt;
  </code></pre>
  
  <p>Expected output is of below code.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>table, th, td {
      border: 1px solid black;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;table&gt;
    &lt;tr&gt;
      &lt;th&gt;Pname&lt;/th&gt;
      &lt;th&gt;Numbers&lt;/th&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td rowspan="2"&gt;Abc&lt;/td&gt;
      &lt;td&gt;123&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;234&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td rowspan="2"&gt;Mno&lt;/td&gt;
      &lt;td&gt;125&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;237&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Problem I am facing is I need to add tr after each run of *ngFor and the number of tr will depend on length of numbers array to make row span.</p>