Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

How to use javascript code behind for blazor component

$
0
0

I'm trying to use JavaScript code behind in blazor here is my solution files in riderrider solution file

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")    }

Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>