replacing jquery ajax with angular $http