C
C
Cach2017-05-17 09:27:30
Angular
Cach, 2017-05-17 09:27:30

Angular2. Architecture. Multiple forms in one component?

Good afternoon. There is one component and one template for it. There are 4 forms in the template. Tell me, please, from the point of view of the "correct architecture", all 4 forms should remain in one component or they need to be separated into separate ones and connected via @input @output. Thanks

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
Cach, 2017-05-17
@Cach

Ivan Stroykin @StivinKing
if they are not connected, then it is better to completely divide them into components along with the logic, where there will be the form itself, form processing and a request to back with information. And in the necessary component it is simple to connect. Thus, in addition to easy reading of the code, everything is on the so-called "shelves" and at any time you can transfer the form from one section to another by moving the selector

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question