@tispratik this might be a good example of the problem of this approach ... 

Your service uses "($q, $location, $rootScope, AlertService)", 
but at the bottom of the page you are injecting ".$inject = [ '$q', '$location', 'AlertService', '$rootScope'  ]". The difference in oder means the "$rootScope" service got renamed to "AlertService".  Being at the bottom of the page makes that hard to see.

![image](https://f.cloud.github.com/assets/2165336/573880/0b682f1e-c7bb-11e2-9477-4f89d0c00127.png)

Eventually Angular will probably fix this whole injection mess another way [e.g.](https://github.com/btford/ngmin), for how we have to be careful.