Based on # being used as a path in the ionic project, $anchorscroll is used for the anchor jump function within the page. The following is the main code used
$location.hash(id);
$anchorScroll();
The operations performed are:
【1】Don't slide the page first, click the button directly to trigger the jump to the corresponding id, and try to see if you can manually slide the page after jumping
【2】Slide the page first, and then Click the button to trigger the jump event and see if it can jump
[3] Slide the page first, then click the button to trigger the jump event. After the successful jump, try to see if you can manually slide the page
On Android, all these operations are possible. On iPad, the second and third operations are invalid. Moreover, after the first jump is successful, the page cannot slide up and only slides down
After searching thousands of Baidu, I finally found the answer:
Just add: overflow-scroll="true" to ion-content
That is: <ion-content overflow-scroll="true">