We are following this pattern in which every function requesting to server is written in a service in angular application.
Then in controller we call that function like this - suppose- service name is - homeService
then we use it like this -
homeService
.getUserName()
.then(getUserNameSuccessCallback, getUserNameErrorCallback);
I wanted to know if the server request is taking long and the user goes to other state, like home to profile so home controller would be destroyed and profile controller would be initialised,would the callback be still fired if the request to server is returned.