If I have one service returning multiple data points and these needs to be displayed in multiple html parts (in below case its three). What is the best way to organize & architect this ?
Kindly note that here Sections and Properties always displayed together.
There are three options, and I am bit confused between 1st and 2nd, which one to opt for.
- Create three Components : TemplateComponent, SectionsComponent & PropertyComponent ?
- Create two components : one Component for Templates and another component for Sections and Properties ?
- Create one component : one component for all three sections.
- ?
We are using Angular~2.0 with CLI.
Sample Service Response
Template_A - Section 1 - Property a - Property b - Section 2 - Property a - Property b Template_B - Section 1 - Property a - Property b - Section 2 - Property a - Property b