If user input a not-existing link, I want the page redirect to Home page.
How can I do it? Thanks
@RouteConfig([
{path: '/home', name: 'Home', component: HomeComponent},
{path: '/about', name: 'About', component: AboutComponent},
{path: '/???', name: 'not-found', redirectTo: ['Home']}
])
This will redirect all unregistered routes to Home
{ path: "/**", redirectTo: ["Home"] }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With