I'm trying to figure out how to pass the resetPassword data to the _confirmToUnlock method in Typescript/RxJS. Here is my subscribe method:
public invokeUnlockModal() {
let resetPassword = { userName: this.user?.userName}; //i need to send this to _confirmToUnlock method
this.infoModal.componentInstance.emitUserOp
.subscribe({ next: this._confirmToUnlock });
}
This method is called when needed:
private _confirmToUnlock = async (response: { opStatus: string }) => {
if (response.opStatus.toLowerCase() === 'confirmed') {
// let resultObs= this.dataService.unlockUser(resetPassword);
//let result= await resultObs.toPromise();
}
}
If anyone has any ideas on how I can achieve this, please let me know.