I am new to typescript. I have a query on how to call a method inside a .ts file from your .html page when u click a html button
.ts file
class AdminTS {
public alertMessageTS() {
alert("This is the test call!!!.");
}
}
.html page
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>
Sample TypeScript page
</title>
<script src="AdminTS.js"></script>
</head>
<body>
<input type="button" value="Click" onclick ="getTrainingName(1)">
</input>
</body>
</html>
I am getting a runtime exception saying getTrainingName is undefined.