In an MVC framework, the data are handled in the model.
In AngularJs, is it common to handle the data directly in a controller, or should it be done in a service instead?
In an MVC framework, the data are handled in the model.
In AngularJs, is it common to handle the data directly in a controller, or should it be done in a service instead?
There is no harm in firing XHRs from within a controller if controller is the only one using the call.
But if multiple controllers need to make the same call you would better move it inside a service for ease of access.