Hi Sander, First of all, thank you so much for your feedback.
I really like your approach, it's straight forward and powerful. but I was told numerous times to keep the controller as simple as possible. If I follow your way, then I'll have to add at least 2 lines in every function that makes a http request. If we use events, then we can forget about writing codes in the controller. I'm only going to show the loader for when there is a http request, and with $httpProvider.interceptors, I can only worry about it in one place. I'd really love to hear more about why using events is not a good practice and using controller is the way to go. If there's any reading I can do, please let me know. Regards, Sean On Thursday, 10 July 2014 01:15:39 UTC-4, Sander Elias wrote: > > Hi Sean, > > Well, best practice is not to use events, for things like this. > here is your plunker adapted: > http://plnkr.co/edit/zjCMiJkH7KnU18MDR2Kr?p=preview > > If you have further questions, don't hesitate to ask! > > Regards > Sander > -- 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.
