I am confused about when to use a service and a function in a controller to perform something . What's the difference here? Am new to AngularJS.
If the explanation could be illustrated with the scenario of registering users in a website that would be great.
Thanks