Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/31.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
我们可以使用Angular Templateurl来引导toMVC.cshtml视图吗_Angular_Asp.net Mvc 4_Iis_Razor_Localhost - Fatal编程技术网

我们可以使用Angular Templateurl来引导toMVC.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

我们可以使用Templateurl来指向.cshtml视图吗

@组件({
选择器:“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@vishalsharma
404(未找到)
表示资源deosnt不存在时,您可能在仅托管方面存在一些问题,请检查本地IIS管理器,
templateUrl:'../../Views/Component/Button',
您需要更改此项。。请尝试“/directory/views/component/button”而不是..//