I have an angular app. When not logged in, I redirect to an unauthorised page. To do this, I re-ordered my routes so one with no navigation was available as this usually is the component that holds the first router outlet so pages load in the content of the side navigation.
const routes: Routes = [
{ path: 'unauthorised', component: UnauthorisedComponent },
{ path: '', component: SideNavigationComponent,
children: [
{ path: '', component: LandingPageComponent },
{ path: 'bookaholiday', component: BookAholidayComponent }]
},
];
This works fine, the redirect to unauthorised works and the normal page works. But if I reload the page with F5 so Im already on my bookaholiday page, it fails to render correctly??? One of my services loads weird and its styles are lost, some of the layout gets extra spans... I cannot event think how to question whats happening. Any ideas at all welcome.