AngularJS: how to enable $locationProvider.html5Mode with deeplinking

前端 未结 5 1353
终归单人心
终归单人心 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:32

    This problem was due to the use of AngularJS 1.1.5 (which was unstable, and obviously had some bug or different implementation of the routing than it was in 1.0.7)

    turning it back to 1.0.7 solved the problem instantly.

    have tried the 1.2.0rc1 version, but have not finished testing as I had to rewrite some of the router functionality since they took it out of the core.

    anyway, this problem is fixed when using AngularJS vs 1.0.7.

提交回复
热议问题