Using javascript from a website template in WASM

Posted 54 days ago by Stefanie

I am new at making Blazor webassembly apps and I wanted to use a website template for my project.

it has a few nice features like a JavaScript carousel and I would like to use those but I dont know where to put the JavaScript links to the files. I have tried putting them in the index.html file in the wwwroot folder but that did not seem to work:

<!DOCTYPE html>

   <meta charset="utf-8" />
   <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
   <base href="/" />
   <link href="css/bootstrap/bootstrap.min.css" rel="stylesheet" />
   <link href="css/app.css" rel="stylesheet" />
   <link href="ImmoPlatform.SPA.styles.css" rel="stylesheet" />
   <link href="manifest.json" rel="manifest" />
   <link rel="apple-touch-icon" sizes="512x512" href="icon-512.png" />

   <div id="app">Loading...</div>

   <div id="blazor-error-ui">
       An unhandled error has occurred.
       <a href="" class="reload">Reload</a>
       <a class="dismiss">🗙</a>

   <script src="_framework/blazor.webassembly.js"></script>

   <!-- jQuery library -->
   <!--<script src=""></script> -->
   <script src="js/jquery.min.js"></script>
   <!-- Include all compiled plugins (below), or include individual files as needed -->
   <script src="js/bootstrap.js"></script>
   <!-- slick slider -->
   <script type="text/javascript" src="js/slick.js"></script>
   <!-- Price picker slider -->
   <script type="text/javascript" src="js/nouislider.js"></script>
   <!-- mixit slider -->
   <script type="text/javascript" src="js/jquery.mixitup.js"></script>
   <!-- Add fancyBox -->
   <script type="text/javascript" src="js/jquery.fancybox.pack.js"></script>
   <!-- Custom js -->
   <script src="js/custom.js"></script>


Do I need to use another way of adding this JavaScript or should I add them somewhere else?

Someone is typing...

Post a Reply

You must be logged in to add a new post.
Number of online users: 1
An error has occurred. This application may no longer respond until reloaded. Reload 🗙