I want to upload image file using angular and php, but I am getting problem at app.service
error line : app.service('fileUpload', ['$https:', function ($https:) {
code
curl -H 'Authorization: Bearer <TOKEN>' \
-H 'Accept-Language: en_US' \
-H 'Content-Type: application/json' \
-X DELETE \
'https://api.uber.com/v1.2/requests/<REQUEST_ID>'
error
app.service('fileUpload', ['$https:', function ($https:) {
this.uploadFileToUrl = function(file, uploadUrl){
var fd = new FormData();
fd.append('file', file);
$https:.post(uploadUrl, fd, {
transformRequest: angular.identity,
headers: {'Content-Type': undefined}
})
.success(function(){
})
.error(function(){
});
}
}]);
答案 0 :(得分:1)
change $('html, body').animate({
scrollTop: $(".responsiveView").offset().top
}, 1000);
to just $https:
$http