Currently, I am working with a TypeScript enum that looks like this:
enum AuthState { New, Exist, Forgot };
In one of my .cshtml files (ASP.NET MVC), I have a button with an Angular ng-click attribute as follows:
<a ng-click="MyClick(AuthState.New)">...</>
Within my auth.ts file in TypeScript, I have an event handler defined like so:
...
$scope.MyClick = (state) => { ... }
...
I am facing an issue where the parameter "state" in the event handler is coming up as "undefined". However, if I simply use
onclick="alert(AuthState.Exist)"
The result will correctly display as "1".