How to config routeProvider and locationProvider in angularJS?

前端 未结 6 1629
忘掉有多难
忘掉有多难 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 00:46

    @Simple-Solution

    I use a simple Python HTTP server. When in the directory of the Angular app in question (using a MBP with Mavericks 10.9 and Python 2.x) I simply run

    python -m SimpleHTTPServer 8080

    And that sets up the simple server on port 8080 letting you visit localhost:8080 on your browser to view the app in development.

    Hope that helped!

提交回复
热议问题