【发布时间】:2016-08-17 17:36:29
【问题描述】:
我想将我的项目发布到 IIS 中的一个文件夹,但是通过设置路由的方式,我得到了一个看起来像内部循环的东西,但没有找到路径。
我已经在一个文件夹中发布了项目
angular.module("common.services", ["ngResource"])
.constant("appSettings",
{
//serverPath: "http://localhost:53967/"
//name of the computer and folder to which the project was published
serverPath:"http://ct-dx-ariang/AspNetWebApi/"
});
并进行如下资源设置
angular.module("common.services").factory("productResource", ["$resource", "appSettings", productResource])
function productResource($resource, appSettings) {
//return $resource(appSettings.serverPath + "/api/products/:search");
return $resource(appSettings.serverPath + "/api/products/:id"
这些是我的路线
$urlRouterProvider.otherwise("/");//default url
$stateProvider.state("home", {
url: "/",
templateUrl: "/templates/welcomeView.html"
}).state("productList", {
url: "/products",
templateUrl: "/templates/productListView.html",
controller: "ProductListController"
}).
如何修改此示例项目,使其在 IIS 上的已发布文件夹中运行,而不是在 Visual Studio 的 localhost 中运行?
【问题讨论】:
标签: angularjs iis asp.net-web-api