On the file app-component.html there is a button:
<button type="button" onclick="confirmChanges()">Save Changes</button>
This confirmChanges calls a javascript function located on my index.html file:
<script>
function confirmChanges(){
var optionSelected = confirm('Are you sure?');
if(optionSelected == true){
alert('Changes were applied sucessfully!');
updateAddress();
} else{
alert('You discarded the changes!');
}
}
</script>
The updateAddress() function its on my app-component.ts file. I would like to know how I could call a typescript function from a javascript function without getting Uncaught ReferenceError. Thank you.