Angular app on IIS 8.x virtual directory has strange URL behavior Angular app on IIS 8.x virtual directory has strange URL behavior angularjs angularjs

Angular app on IIS 8.x virtual directory has strange URL behavior


try to add this in you head tag.

<html><head>    <base href="/VirtualDirectory/"></head><body>    ...</body>


I found that if you use the ./ syntax for the path, you don't need to involve Razor.

Code which fails:

$routeProvider.when("/productList", {            templateUrl: "/app/products/productListView.html", controller: "ProductListController as vm"        });

Code that works: (note the . before /app)

$routeProvider.when("/productList", {            templateUrl: "./app/products/productListView.html", controller: "ProductListController as vm"        });