I am looking for a way to handle empty paths in my routing module by redirecting to the current page. Can someone help me achieve this? Thank you in advance.
Below are the routes defined:
const routes: Routes = [
{
path: 'students',
component: StudentComponent
},
{
path: 'teachers',
component: TeacherComponent
},
{
path: '',
redirectTo: '' // In this case, I simply want to redirect to the current page or do nothing
}
];