PO-UI - Page Dynamic Table is not calling Metadata url

Asked

Viewed 155 times

0

question if it refers to PO-UI library, but I have no right to tag here in OS I have the following component:

<po-page-dynamic-table
  p-service-api="http://localhost:5000/api/clientes">
</po-page-dynamic-table>

In the documentation says if you use via Route and do not set metadata it will call the serviceApi with /metadata to get the metadata.

When I use direct component it doesn’t do this?

Can I set the metadata url somehow? Or when you use the element inside a component, it doesn’t do the search alone?

2 answers

4


When you use the direct component you are responsible for assigning the properties, it only uses metadata when you use via route.

// HTML
<po-page-dynamic-table
  [p-actions]="actions"
  [p-fields]="fields"
  p-service-api="http://localhost:5000/api/clientes">
</po-page-dynamic-table>

// TS
actions: PoPageDynamicTableAction = {
  new: this.onNew.bind(this),
  ...
};

fields: Array<PoPageDynamicTableFilters> = [
  { property: 'id', key: true },
  { property: 'name', filter: true },
  ...
];

You can request on ngOnInit from your page and request also if you need to have the component in your application.

2

The request is made for the metadata when used via route, according to the image below:

inserir a descrição da imagem aqui

Browser other questions tagged

You are not signed in. Login or sign up in order to post.