javascript - TypeScript : Cannot invoke an expression whose type lacks a call signature -


i new typescript. have typescript function want pass id particular record back. getting error on return line. researched before posting here not close scenario. appreciated!

error ts2349 cannot invoke expression type lacks call signature.

private getrecordrequesturl = 'http://localhost/service/api/reservationrequest/getrequestbyid';   getrecordrequest(requestid: number): promise<reservationmodel[]> {         return this.http.get(this.getrecordrequesturl(requestid))             .topromise()             .then(response => response.json().data reservationmodel[])             .catch(this.handleerror); } 

this.getrecordrequesturl not function, it's string. if want add requestid it, should concatenate value, e.g.: return this.http.get(this.getrecordrequesturl + '/' + requestid)


Comments

Popular posts from this blog

inversion of control - Autofac named registration constructor injection -

verilog - Systemverilog dynamic casting issues -

ios - Change Storyboard View using Seague -