I have the following code to receive my form data and send it to my service that you create with spring
angle code
crearCalidadProducto(calidadproducto: CalidadProducto){
let json = JSON.stringify(calidadproducto);
let params = 'json='+json;
let headers = new Headers({'Content-Type':'application/json'});
headers.append('Access-Control-Allow-Origin','*');
return this._http.post(this.url+'crear',params, {headers: headers})
.map(res => res.json());
}
but at the moment of sending by post it shows me the error in the console
Error in the browser console
Failed to load link : Response to preflight request does not pass access control check: No 'Access-Control-Allow- Origin 'header is present on the requested resource. Origin ' link ' is therefore not allowed access. The response had HTTP status code 403.
Thanks for your input