In my real world application I want to check in the startup component (usually app.component.ts) if a user is authenticated. If not, I want to route them to the login component. But routing doesn't work here.
I create a simple Plunker example, where it is reproduceable:
- Open live example
- Click the button "navigate to sample 1" --> everything works
- But you can see, that I have the same routing command already in the
app/app.component.ts
- but the application doesn't route to the component. Why??
Thanks for your help!