I’m trying to use JavaScript code behind in blazor here is my solution files in rider
and inside TestComponent.razor.js
there is code by default, I don’t know what is this (is this necessary ?)
export class TestComponent {
}
window.TestComponent = TestComponent;
and this is my js code trying to put into TestComponent.razor.js
file
example: we have two function and 1 line JS code without putting into any function , so how to put these js code into TestComponent.razor.js
and how to use them
console.log("no function code");
function MyLogFunction1(){
console.log("function1")
}
function MyLogFunction2(){
console.log("function2")
}