Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular 4 error "Expected 2-3 arguments, but got 1"

I have created a code that I want to upload files

  uploadImages(fda){
  return this.http.post(this.apiUrl+"/uploadImages/"+fda)
  .map((res : Response) => res);
}

but shows the error of

ERROR in E:/MCQ/CsExamsModule - Client/src/app/services/question.service.ts (90,14): Expected 2-3 arguments, but got 1.
like image 872
doc leo Avatar asked Nov 14 '18 09:11

doc leo


1 Answers

Use {} as the second argument, like this:

return this.http.post(this.apiUrl+"/uploadImages/"+fda, {})
like image 110
sachintha hewawasam Avatar answered Oct 20 '22 10:10

sachintha hewawasam