I am building a web application with ASP.NET MVC and AngularJS. When I debug a web application, the url looks like this:
http://localhost/Home/Index
When I publish it on the IIS development server, I use then I use the default website, so the URL will be like this:
http://ipaddress/MyApp/Home/Index
Because of this, my directives do not work. They are configured as follows:
'/Login':
{
templateUrl: '/Account/Login',
controller: 'AccountController'
},
On the IIS development server, this directive calls the web application route:
http:
which should be
http:
Is there a way to change the directives to work in both cases?
I tried playing with the "/" character before the Url pattern, but it does not work (it gets localhost / Home / Account / Login instead of localhost / Account / Login)
source
share