Angular after routing to the other page, component on new page don't work as it's working if to reload this page

I have routes between pages by swipe and when I swipe to the page where should be component with dates that works in a way when we scroll down it adds past dates to this component. It's working if I reload browser on this page and it's good, but if I route to this page it doesn't work.

That's how I'm routing to this page. But actually routing from html via [routerLink] does the same. Component isn't working.

onSwipeRight = () => {
    this.router.navigate(['/page']);
  }

And that's how my app-routing.module.ts is looking like.

const routes: Routes = [
  {
    path: '',
    redirectTo: 'mainpage',
    pathMatch: 'full',
  },
  {
    path: 'neededpage',
    loadChildren: () =>
      import('./neededpage/neededpage.module').then((m) => m.NeededpagePageModule),
  }
]

Ответы (0 шт):