I am new to typescript/angular project and working on one project. In .html file i am calling delete operation but i want to add extra confirmation for delete operation. My existing code is :
<a (click)="onUserDelete()" class = "btn btn-danger" >Delete User</a>
How to add conditional check and call 'onUserDelete()' function whic is define in .ts file.
I tried adding but it always throws error. Tried code:
<script type="text/javascript">
function UserDelete(){
onUserDelete();
}
</script>
<a (click)="UserDelete()" class = "btn btn-danger" >Delete</a>
It always throws UserDelete is not a function.