I have a Angular frontend and Springboot backend generated with jhipster. I have a form where I save a few information. I want to send these to the backend. But there is one problem. I do not get any response from the serve guessing that there is no Request made.
I controlled it via the console from my browser and the network part is empty. When I debug there seems to be no error at all. Because there is no error log I do not know how to solve this problem. COuld someone take a look and maybe give me a advice why this happened.
my ts file:
materialAddForm: FormGroup;
formData: any;
@Input()
materialModel: MaterialModel
constructor(
private materialService: MaterialService,
) {this.materialModel = new MaterialModel(
11
) }
ngOnInit() {
}
saveMaterial() {
this.materialService.addMaterial(this.materialModel);
console.log(this.materialModel)
}
My service with the backend call:
constructor(
private http: HttpClient,
) { }
addMaterial(material: MaterialModel): Observable<MaterialModel> {
return this.http.post(environment.api_server_product_url + 'api/materials-add', material);
console.log("HALLO RESPONSE")
}