Replaced $.ajax with Angular  service