我对角形插座有疑问。在路线上,我有这样的结构:
const routes: Routes = [
{
path: 'path',
component: MyComponent,
children: [
{
path: 'modal-route-1',
component: FirstModal,
outlet: 'modal',
},
{
path: 'modal-route-2',
component: SecondModal,
outlet: 'modal',
}
]
}
];
我可以从FirstModal
导航到SecondModal
。问题是,如果我在MyComponent
中滚动并从{{1}}导航,则一切正常,滚动消失。但是,当我从FirstModal
导航到SecondModal
时,将恢复从FirstModal
滚动。该如何解决?