title: How to call js script file in asp.net core Blazor
body: <p>How to call js script file (app.js) in the section of <code>@code</code></p>
  
  <pre><code>&lt;script src="~/js/app.js"&gt;&lt;/script&gt;
  &lt;script src="~/js/app.js"&gt;
  function indexSlider(){
   alert(1);
  }
  </code></pre>
  
  <p></p>
  
  <pre><code>@code{
      protected override async Task OnAfterRenderAsync(bool firstRender)
      {
          if (!firstRender)
          {
              return;
          }
  
          await JSRuntime.InvokeAsync&lt;string&gt;("indexSlider");
  
      }
  }
  </code></pre>