In my component, there are buttons to set the properties as follows:
dataType:String = null
fechaI : Date = null
fechaF :Date = null
checkedList =[]
I need to trigger an HTTP request when all properties have values and redo the request if any of them change during runtime.
I attempted using ngDoCheck:
ngDoCheck(){
if((this.checkedList !=null)&&(this.dataType!=null)&&(this.fechaI !=null)&&(this.fechaF !=null)){
console.table(this.checkedList)
console.log(this.dataType)
console.log(this.fechaF)
console.log('Sending Options')
this.http.post('',{})
}
}
However, the doCheck hook gets triggered every time I scroll or perform any action, making it not a suitable solution. How can I achieve the desired outcome?