This project was created to demonstrate how to use JS interop on the new .Net 8 Blazor Web App project with Server side rendering.
The project contains two pages with examples of how to use JS interop, one using a js file and another using a ts file.
Well, because the documentation is not clear enough and the examples are not complete. I had to search a lot and try a lot and make loads of mistakes until I got it working.
JavaScript isolation in JavaScript modules
Load a script from an external JavaScript file (.js
) collocated with a component
I ended up creating also an example with typescript, just to give it a go and see if it would work. And it did.
If you want to improve it and add more examples, feel free to do so. I will be happy to accept pull requests.