How do I configure IIS for URL Rewriting an AngularJS application in HTML5 mode?

后端 未结 7 2197
春和景丽
春和景丽 2020-11-22 12:12

I have the AngularJS seed project and I\'ve added

$locationProvider.html5Mode(true).hashPrefix(\'!\');

to the app.js file. I want to confi

7条回答
  •  故里飘歌
    2020-11-22 12:25

    The IIS inbound rules as shown in the question DO work. I had to clear the browser cache and add the following line in the top of my section of the index.html page:

    
    

    This is because I have more than one application in localhost and so requests to other partials were being taken to localhost/app/view1 instead of localhost/myApplication/app/view1

    Hopefully this helps someone!

提交回复
热议问题