Hi Bennie, Passing the data into a function, using parameters, in stead of relying on some way off communication (in an angular app usually $scope), makes it way more explicit. Being explicit makes later on refactoring/maintenance much easier. Imagine that you need to move the actual function that does the submit to another controller/service/directive/whatever. If that function is using scope, that's more of a challenge. If it receives everything it needs trough its parameters, it is much easier to do this right? Testing also becomes simpler for this function. No more fussing around with $scope. Just feed it an object with test-data and check if it's getting saved.
I'm not aware of the blog/video you are referring to, so I can't help you with that. Just hoping that this answer is somewhat usefull to you? 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.
