AngularJS: how to enable $locationProvider.html5Mode with deeplinking

前端 未结 5 1370
终归单人心
终归单人心 2020-11-27 12:02

When enabling the html5Mode in AngularJS via $locationProvider.html5Mode(true), navigation seems to be skewed when you land on a page deeper in the site.

<
5条回答
  •  不知归路
    2020-11-27 12:21

    1. Configure AngularJS

    $location / switching between html5 and hashbang mode / link rewriting

    1. Configure your server:

    https://github.com/angular-ui/ui-router/wiki/Frequently-Asked-Questions#wiki-how-to-configure-your-server-to-work-with-html5mode

提交回复
热议问题