AngularJS - Why when changing url address $routeProvider doesn't seem to work and I get a 404 error

前端 未结 2 508
慢半拍i
慢半拍i 2021-02-13 15:01

My $routeProvider is configured like this:

teachApp.config([\'$routeProvider\', \'$locationProvider\', function($routeProvider,       $locationProvi         


        
2条回答
  •  有刺的猬
    2021-02-13 15:47

    You can also use # in your URLs.

    http://localhost/teach/#/overview
    

    This will not send a request to the server and will instead be intercepted by the Angular $routeProvider.

提交回复
热议问题