简体   繁体   English

如何将JavaScript库添加到C#MVC项目?

[英]How do I add a JavaScript library to my C# MVC project?

I'm not sure how to add this Google maps Geolocation marker library to my project. 我不确定如何将此 Google Maps Geolocation标记库添加到我的项目中。 I am using Visual Studio 2013 - how should I add it so I can then use the geolocation objects? 我正在使用Visual Studio 2013-应该如何添加它,以便随后可以使用地理位置对象?

I have tried Googling and looking on this site but couldn't find anything useful - can anybody help? 我已经尝试使用Google搜索并在此站点上查找,但找不到任何有用的方法-有人可以帮忙吗?

You have a few options. 您有几种选择。

  • Grab the minified version of the library in the dist folder, add the file to your project and link it in your pages. dist文件夹中获取库的缩小版本,将文件添加到您的项目中并将其链接到页面中。
  • Grab the uncompiled version in the src folder, add to your project, and link it in your pages src文件夹中获取未编译的版本,添加到您的项目中,并将其链接到页面中
  • Use bower ( http://bower.io/ , you'll have to set it up if you've never used it before). 使用bowerhttp://bower.io/ ,如果您以前从未使用过它,则必须对其进行设置)。 You can then just do a bower install bower-geolocationmarker to grab the files, which you can then link to in your pages 然后,您可以只进行bower install bower-geolocationmarker即可获取文件,然后可以链接到页面中

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM