Table does not display data with PrimeNg and Angular

0

Good morning, I'm creating a simple table with PrimeNg and Angular where I do a binding with an array of data in the component. In the log I have no error return, but it does not display anything.

<div class="ui-g">
<div class="ui-g-12">
  <p-table [value]="plcData" [responsive]="true" [paginator]=true [lazy]="true">
    <ng-template pTemplate="header">
      <tr>
        <th>Descrição</th>
        <th>Modelo</th>
      </tr>
    </ng-template>
    <ng-template pTemplate="body" let-plc>
      <tr>
        <td>{{plcData.descricao}}</td>
        <td>{{plcData.modelo}}</td>
      </tr>
    </ng-template>

    <ng-template pTemplate="emptymessage">
      <tr>
        <td colspan="6">Nenhum dado encontrado</td>
      </tr>
    </ng-template>

  </p-table>
</div>


    import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-plc-fabricante-pesquisa',
  templateUrl: './plc-fabricante-pesquisa.component.html',
  styleUrls: ['./plc-fabricante-pesquisa.component.css']
})
export class PlcFabricantePesquisaComponent {

  plcData = [
    {descricao: 'PLC123', modelo: 'Rockwell'},
    {descricao: 'PLC', modelo: 'Rockwell'},
    {descricao: 'PLCii', modelo: 'Rockwell'},
    {descricao: 'PLCabc', modelo: 'Siemens'},
    {descricao: 'PLCether', modelo: 'Siemens'}
  ];

}  

Screen:

    
asked by anonymous 05.10.2018 / 15:34

0 answers