ng-lightning / ng-lightning

Native Angular components & directives for Lightning Design System

Home Page:http://ng-lightning.github.io/ng-lightning/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to get index of ngl-datatable of ng-lightning

AtouiIlyes opened this issue · comments

I am trying to get index of ngl-datatable but i didn't figure out how to do it ?

You can do it using let-index="index" in ng-template.
example:

table(ngl-datatable, [data]="data")
  ngl-datatable-column(heading="#", key="index")
    ng-template(nglDatatableCell, let-index="index")
      span {{index}}
....

thanks that really helped me