AngularJS + Safari: Force page to scroll to top when pages switch

后端 未结 9 2041
深忆病人
深忆病人 2021-02-07 00:20

I am having an odd, safari-only scrolling behavior using AngularJS.

Whenever the user flips between pages, the pages are being changed as if they are AJAX. I understand

9条回答
  •  故里飘歌
    2021-02-07 00:49

    I got the same problem while using AngularJS in a Cordova App. In a normal Browser or on Android i have no trouble but on ios i get the same behavior as discribed by Neil.

    The AngularJS documentation on $anchorScroll is not that great so i thought to post this link which helped me way more:

    http://www.benlesh.com/2013/02/angular-js-scrolling-to-element-by-id.html

提交回复
热议问题