What would a recommended setup be for having components communicating with a server?
So a feature, say a todo feature. It may have a main todo-component, a todo-list-component, a todo-item-component, new-todo-component and a todo-service (and probably more). Then there is another feature, say a personal activity timeline, which takes several source (including new and finished todos) and present it to the user. Say it may have the same type of files (but so different that we could not combine them into a generic one): a main timeline-component, a timeline-list-component, a timeline-item-component and a todo-service. Then we want for both the todo and the timeline features to communicate with the server. Since they both access partly the same data, perhaps a good idea would to have a backend-service to take care of the server communication for both features. But how should the components get the data it's need? Should the todo components as the todo-service which in turn asks the backend-service (and similar for the timeline components)? Or should the components better use the backend-service directly (so the todo components would use backend-service for backend stuff and todo-service for other things that is naturally to put in a service)? Thanks for any thoughts! -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
