正如问题所暗示的那样,滚动动画按预期工作,但是当我单击导航栏中的链接时,它确实将我带到同一页面上的联系人部分(例如),但它没有检测到鼠标滚动,因此不会触发该部分的动画。
任何帮助或想法将不胜感激!
编辑:使用 Click 事件从导航栏滚动到所需部分
goTo(location: string): void {
window.location.hash = location;
//Tried using this, but it does trigger the animation on scroll up, not on scroll down
AOS.refresh();
}