After hosting Angular2 app on IIS direct url is not working

前端 未结 3 1889
日久生厌
日久生厌 2020-12-24 04:07

We have developed Angular2 App.

It is working fine while we are running under angular-cli with \'ng serve\'.

Once we host the app to IIS 7.5, we can browse t

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-24 04:30

    An even simpler change worked for me, using Angular 4.0 and IIS 6.1. This allowed me to use a named site instead of the default folder or the rewriting above. I just changed the base href from '/' to the name of my app folder:

    
        
    ...
    

    Hope this works for others!

提交回复
热议问题