changed ajax request to  angular request