Good day, my query is simple I have this function:
capturaInformacion(estadoId:number, nombreEstado:string){
let data = {
"estadoId": estadoId,
"nombreEstado": nombreEstado
}
// mostrar el estado y el nombre de la informacion
console.log("Estado + Nombre del Id", data);
}
I need to save the parameters in a variable, I have tried this way:
// Nombre de mi Variable // Nombre de la Funcion y sus Parametros
this.informationCapture = this.capturaInformacion(estadoId, data.nombreEstado);
But I haven't achieved anything with that and my idea is to use the variable to display stateName using interpolation in Angular.
The function returns nothing, so the executed code is of no consequence. You should do something like:
That way, the informationCapture property will have the return value.