<div dir="ltr">Hi folks,<div><br></div><div>Something that's been bothering me for a while is that the action services break the encapsulation model of Angular Services - that they are singletons, and consumable by multiple simultaneous consumers without those consumers affecting each other through their use of the Service.</div><div><br></div><div>At the moment the initScope() functionality we've included in the action services breaks that model - at a minimum it is possible for multiple consumers to initScope() with different scopes simultaneously. This is the reason why I've been arguing (ok, "debating" :-) for the cessation of using scopes in this way.</div><div><br></div><div>I think we need to do two things reasonably soon (before patterns become more ingrained):</div><div><br></div><div>1. Stop passing in $scope to initScope in all cases - the new ActionResult-enabled pattern should hopefully replace all those</div><div>2. Remove all initScope methods altogether. The only other use of initScope that I see is the pre-loading of data used during the execution of action allowed() methods. We should move that preloading/caching either into the creation of the Service object itself, or into the allowed method.</div><div><br></div><div>If there is a use-case of initScope that I've missed (something that needs to be execute *after* the Service is created, not something that needs to tie the Service to a particular consumer of the service) then please let me know :-)</div><div><br></div><div><br></div><div>     Richard</div><div><br></div></div>