1
My Angular application is at the root of the domain and I want when typing an empty route it redirects to /home
, where in this folder I have Wordpress installed. That is to say always type only www.dominio.com the light route to /home
where Wordpress is Installed.
my file of routes
export const ROUTES:Routes = [
{
path: 'home', component:PublicComponent,
children: [
{ path: },
]
},
{
path: 'clientnotfound',component:PublicComponent,
children: [
{ path: '',component: PastaClienteComponent},
]
},
{
path: 'confirmado',component:PublicComponent,
children: [
{ path: ':id',component: CadastroFinalComponent},
]
},
// Main redirect
{path: '', redirectTo: '/home', pathMatch: 'full'},
// Handle all other routes
{path: '**', redirectTo: '/clientnotfound'}
];
picture of the final directory
But the {{ path: '', Component: Homecomponent }} didn’t work?
– LeAndrade
when the user type www.dominio.com it takes to home component (which does not contain wordpress), already when of type www.dominio.com/home it loads the wordpress that this in this folder, ignoring the route.
– Alessandro Barros
Could insert an image of how folders are arranged in the project?
– LeAndrade