How to config routeProvider and locationProvider in angularJS?

前端 未结 6 1622
忘掉有多难
忘掉有多难 2020-11-29 00:03

I want to active html5Mode in angularJS, but I don\'t know why it\'s not working. Is there anything wrong with my code?



        
6条回答
  •  执念已碎
    2020-11-29 01:02

    Try this

    If you are deploying your app into the root context (e.g. https://myapp.com/), set the base URL to /:

    
      
      ...
    
    

    Angular Documentation

提交回复
热议问题