How to pass function into components

Is that possible to pass param into component like this

@!component('components.table',
        columns = [
          {
            title: 'id',
            key: 'id'
          },
          {
            title: 'Code',
            key: 'code',
          },
          {
            title: 'Status',
            template:  function (rowData) {
              return rowData.active ? '<span class="badge badge-success">Active</span>' : '<span class="badge badge-secondary">Not active</span>'
            }
          },
          {
            title: 'Action',
            template: function (rowData) {
               return '<a href="' + rowData.link + '"  >edit</a>'
}
          }
        ],
        data = data
      )

and this is my component file

<table id="table" class="display" style="width:100%">
  <thead>
    <tr>
      @each(column in  columns)
        <th>{{ column.title }}</th>
      @endeach
    </tr>
  </thead>
  <tbody>
    @each(row in data)
      <tr>
        @each(column in columns)
          @if(column.template)
            {{ column.template($parent.row) }}
          @elseif(column.key)
            <td>{{ $parent.row[column.key] }}</td>
          @else
            <td></td>
          @endif
        @endeach
      </tr>
    @endeach
  </tbody>
  <tfoot>
    <tr>
      @each(column in  columns)
        <th>{{ column.title }}</th>
      @endeach
    </tr>
  </tfoot>
</table>

and now i got error

> E_INVALID_EXPRESSION: Invalid expression … passed to (component) block