September 2017
Intermediate to advanced
450 pages
11h 24m
English
When working with multiple modules in your Angular application, you may want to route to a specific module from the home page of your application. To accomplish this, you just need to provide a redirectTo route as a string that is registered with your module's route configuration, and the flag pathMatch: 'full':
{ path: "", redirectTo: "/posts", pathMatch: 'full'},
This flag tells Angular how much of the path has to match before triggering the redirect. In this case, we want it when the path is completely empty to redirect to the /posts route.
Read now
Unlock full access