Currently, I am in the process of developing a web application using ASP.NET MVC and AngularJS. When testing the application locally, the URL appears as follows:
http://localhost/Home/Index#/Login
However, once I deploy the application to the IIS development server using the Default Web Site, the URL changes to:
http://ipaddress/MyApp/Home/Index#/Login
The issue arises because my directives are set up in a specific way:
'/Login':
{
templateUrl: '/Account/Login',
controller: 'AccountController'
},
On the IIS development server, this directive directs to the following route:
http://ipaddress/Account/Login
instead of the intended:
http://ipaddress/MyApp/Account/Login
I have attempted to adjust the directives by manipulating the "/" character in front of the templateUrl, but it did not resolve the issue (resulting in localhost/Home/Account/Login instead of localhost/Account/Login).
Is there a solution that would allow the directives to function correctly in both scenarios?