are you using the jQuery ajax capability here? Use angluar $http pls.