My app has private and public parts.
If user not logged in then he should see landing page with some 'about text', facebook/twitter links and a link to login/register as a root page of application.
If he is logged in - he should get a dashboard page filled with user specific data as a root of whole application.
And surely, it would be nice to have both of these pages handled by one root route "/".
So i wonder, what is the right way to implement it with angular 2+ and native router?
export const ROUTES: Routes = [{
path: '/',
component: isAuthenticated() ? DashboardComponent : LandingPageComponent
}]