I've got a number of services that are basically collection clearing houses 
for certain types of objects.  I'm wondering how it's generally preferred 
to handle the following:

I've got a ContactService and a ContactPageController, let's say.  All 
remote fetching is handled in the service.  I want to initiate a remote 
fetch from the controller.  Do I:

1) Have the service return a promise and let the controller handle letting 
other controllers/services know there has been an update?
2) Let the service deal with it's own promise and broadcast some kind of 
'collectionUpdated' event?

Just curious if there's a best practice suggestion for this?  I'm currently 
leaning on #2.

Thanks.

-- 
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 http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to