devio
devio

Reputation: 1169

ASP.NET Core : include jquery in a view

I used Bower to download jquery in my ASP.NET Core project, and here's my project structure :

projet tree structure

Now, I want to include jquery in my view, and it's not working. I tried :

<script src="bower_components/jquery/dist/jquery.js"></script>

but in vain.

Upvotes: 2

Views: 1911

Answers (1)

Mostafiz
Mostafiz

Reputation: 7352

Default location for the bower file is like

{
  "directory": "wwwroot/lib"
}

so you can reference them llike

<script src="~/lib/jquery.js"></script> 

and also you can modify it, see the asp.net core documentation

Documentation

Upvotes: 1

Related Questions