export class EditClientComponent implements OnInit {
apiEndPoint: 'http://localhost:1337/upload';
fileChange(event) {
//...
this.http.post(`${this.apiEndPoint}`, formData, httpOptions)
//...
}
}
I get a weird error:
status: 404, statusText: "Not Found", url: "http://localhost:4100/undefined"...
Which means that it's not reading apiEndPoint at all, and if I replace ${this.apiEndPoint} with the actual url, it works.
What can I do?