I have structured my AngularJs application in a way where I have a factory that fetch data from a back-end using ngResource as a dependency. This factory is injected in a Service, and finally this service is injected in a controller.
The problem is that since my Back-end calls take some time, results are not reflected in the controller. I do manage the promise in the service and it does return a result after some time 'cause I'm able to print it in the console, and I really want to avoid this promise handling in the controller, also the $q usage is now deprecated so I want to know if there's a more fancy solution more like Angular(2/4) that exists for AngularJs to resolve this problem.
Thank you