accessing parents table variable in childs table in primeng table

  angular, primeng

I have two nested primeng p-tables,

<ng-template pTemplate="rowexpansion" let-data>
                        <p-table  [value]="phrTabs" dataKey="tabid">
                            <ng-template pTemplate="body" let-phrdata let-expanded="expanded">
                                    <td>{{phrdata.tabname}} {{data.value}}</td>

I want to access data variable in my inner p-table but I’m using a different array for the table value and I cant seem to access data variable. Is there anyway I can declare in template or p-table so that I can use it in my inner table.

Source: Angular Questions

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.