On my HTML page, I am invoking a method with parameters using the onchange event. Once I retrieve the value, I trigger function2 on the click of another button. I am looking to access the variable from function in function2 within the same class. My implementation is based on Angular 6 and TypeScript. Below is a snippet of my TypeScript file:
export class Component extends Lifecycle {
cc1: string;
constructor (){}
Function (cc1, cc2)
{
this.cc1 = cc1;
// return cc1;
}
Function2 (){
console.log(cc1);
}
}
Could someone provide assistance on this matter?