vendredi 31 mars 2017

How to fill the primeng

I´m trying to fill my datatable () with my firebase database content. But I don´t know how to use the *ngFor like I used in a normal table. The normal way is done:

<tr *ngFor="let docu of documentos | async">
  <td></td>
  <td></td>
  <td  ></td>
  <td  ></td>
  <td width="20%"><a class="btn btn-success" target="_blank" href="">Ver</a></td>
</tr>

It fills perfectly. But now I want to use PrimeNG

<p-dataTable [value]="" *ngFor='let docu of documentos | async'>
<p-column field= header="Nombre"></p-column>
<p-column field="year" header="Tipo"></p-column>
<p-column field="brand" header="Permiso de usuario"></p-column>
<p-column field="color" header="Permiso de grupo"></p-column>
<p-column field="color" header="Enlace"></p-column></p-dataTable>

My problen is [value], I don´t know how to fill an array with a FirebaseObservableList. I retrieve the the list with this:

documentos: FirebaseListObservable<any> = af.database.list('/Documentos');

af is my AngularFire on constructor.

Some ideas?




Aucun commentaire:

Enregistrer un commentaire