How to add javascript function to blazor server .net6 project
Пікірлер: 2
@MarkInChicago2 жыл бұрын
Nice video! Why did you create and call a seperate Alert method from the Save method instead of making the call to JsRuntime from the Save method? Was it to show how you'd create a reusable method? Also, it would be useful to see how you'd take the source code from this video and change it so the JavaScript would be isolated to the index.razor component/page. Thanks
@CodingJackpot2 жыл бұрын
Yes, you are right i wanted to create a resuable method so that it can be used multiple times on same page and also by just importing the jsruntime we can add it on multiple pages .. coming to your last point the javascript is already isolated in script.js file in wwwroot folder