I have the following expression if the user is a guest:
this.router.navigate(['/intro']);
in my app.component.ts ngOnInit() method.
My app.component.html has <router-outlet></router-outlet>
but when I access my app as guest, the IntroComponent is not displayed and the URL stays empty without the /intro.
What's wrong?
my app.routes.ts
const appRoutes: Routes = [
{ path: '', component: HomeComponent },
{path:'intro',component: IntroComponent},
{path:'login',component: LoginComponent},
{path:'register', component: RegisterComponent}
];