Recently, I decided to explore Angular JS and Async calls as an alternative to $JQuery. However, I encountered a peculiar issue while making ajax calls.
To adhere to 'best practices', I shifted my ajax requests to a service and then initiated the ajax calls in my controllers using the created service.
The problem I am facing is that the ajax requests are not reaching the server when made through the service.
Here is a simplified image of the service I have defined:
Similarly, here is an image of the controller I am using:
Interestingly, when I directly execute the ajax call from the controller, it successfully reaches the server. Any ideas why this might be happening?