I am trying to design a profile(resume) page with many parts using angular2.
These parts are photo, contact, experiences etc.
Each part editable when double clicking a text. When any part is edit mode, two button(save&cancel) will be visible.
A simple demo plunk is http://plnkr.co/edit/OQgaMz?p=preview
So, i couldn’t decide which below approach is suitable for my case.
- Single component and single service.
- Single service(singletion) to keep application state and multiple
component. Sharing state between components via service.
Single service and multiple component(parent and childs), retriving
data only in the service, getting by parent component and passing to child via @input, for interaction using @output.
Application states are distributed.
Multiple components and multiple services with interaction between
components. Each component gets own data using own service, and
keeps own states.
Do you have any suggest?