【发布时间】:2018-07-03 08:43:38
【问题描述】:
例如,我的 ASP.NET MVC 4 项目文件夹中有一个 Angular 项目文件夹。
MyAspProjectFolder/App/AngularFolder/dist/index.html
当我从操作重定向到这个文件时,使用
return Redirect(Url.Content("App/angularproj/dist/index.html"));
在打开 html 文件时,该 html 文件中的路径理解错误。例如,在这个 HTML 文件中,我有一个脚本链接
<script type="text/javascript" src="polyfills.bundle.js">
ASP 试图从 localhost 获取它的相对值,例如
http://localhost:53131/polyfills.bundle.js
但它不在本地主机中,它在下面
App/angularproj/dist/polyfills.bundle.js
是否可以说 ASP,当我执行某些路线(例如 App/angularproj/ )时,这意味着该路线下的所有内容也与该路线相关。
【问题讨论】:
-
您找到解决方案了吗?
标签: asp.net asp.net-mvc-4 routing