K
K
Konstantin2020-06-24 22:29:51
Angular
Konstantin, 2020-06-24 22:29:51

How to properly assemble a component?

I have a task to make a simple component that has some set (list) of options to choose from.
This component can be used anywhere where you need to sort data by the selected values ​​from the component.
For example, the values ​​id and name are selected from the list. This means that you need to apply filtering for the table by the id, name fields.

My question is not implementation related, but architecture related, what inputs should the component have. Do I need to put it all in the service? How to apply the values ​​selected in the component to the parent (table) ?

An example with code - would be ideal to see

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question