I am not sure what I am trying to do has any logic yet giving it a try.
I am trying to add Veriff SDK in my Angular App. The following error I get. Any help appreciated.
the .html
<button class="btn" [disabled]="isVerified"
(click)="myFn()">Finish</button>
The .ts file
export class myComponent(){
isVerified : boolean = true;
ngOnInit() {
const veriff = Veriff({
host: 'https://stationapi.veriff.com',
apiKey: '',
parentId: 'veriff-root',
onSession: function(err, response) {
console.log(response.status) //success
window.veriffSDK.createVeriffFrame({ url: response.verification.url });
if( response && response.status === 'success'){
this.isVerified = !this.isVerified
}
.....} //rest of the code is here
On ngOnInit() I call the Veriff api.
I am trying if response is success make disable false. But I am getting this Cannot read property 'isVerified' of undefined. How to fix this.