AngularJs AjaxWrapper factory