我们可以使用Angular Templateurl来引导toMVC.cshtml视图吗
我们可以使用Templateurl来指向.cshtml视图吗我们可以使用Angular Templateurl来引导toMVC.cshtml视图吗,angular,asp.net-mvc-4,iis,razor,localhost,Angular,Asp.net Mvc 4,Iis,Razor,Localhost,我们可以使用Templateurl来指向.cshtml视图吗 @组件({ 选择器:“sq按钮”, templateUrl:“../../Views/Component/Button”, 样式URL:['button.component.css'] }) 上面的代码正在iis express中加载视图,但是当我将项目属性更改为本地iis时,会出现以下错误 1。加载资源失败:服务器响应状态为404(未找到) 2.未处理的承诺拒绝:加载失败http://localhost/Views/Componen
@组件({
选择器:“sq按钮”,
templateUrl:“../../Views/Component/Button”,
样式URL:['button.component.css']
})
上面的代码正在iis express中加载视图,但是当我将项目属性更改为本地iis时,会出现以下错误
1。加载资源失败:服务器响应状态为404(未找到)
2.未处理的承诺拒绝:加载失败http://localhost/Views/Component/Button ; 区域:;任务:承诺;值:未能加载http://localhost/Views/Component/Button
将项目更改为本地iis后是否需要进行任何更改?,此url是否正确?是!url是正确的。当我在IIS express中运行它时,相同的url也可以工作。但当我将其更改为local IIS@vishalsharma
404(未找到)
表示资源deosnt不存在时,您可能在仅托管方面存在一些问题,请检查本地IIS管理器,templateUrl:'../../Views/Component/Button',
您需要更改此项。。请尝试“/directory/views/component/button”而不是../,这是正确的url吗?是!url是正确的。当我在IIS express中运行它时,相同的url也可以工作。但当我将其更改为local IIS@vishalsharma404(未找到)
表示资源deosnt不存在时,您可能在仅托管方面存在一些问题,请检查本地IIS管理器,templateUrl:'../../Views/Component/Button',
您需要更改此项。。请尝试“/directory/views/component/button”而不是..//