Take a look at this code:
{path : 'recipes', component:RecipesComponent, children:[
{path:':id', component:RecipeDetailComponent},
{path:':new', component:NewRecipeComponent }
]},
No matter which link you use:
http://localhost:4200/recipes/new, or
http://localhost:4200/recipes/12, or
http://localhost:4200/recipes/details
They will all open the RecipeDetailComponent component.
How can I configure {path:':new', component:NewRecipeComponent } so that http://localhost:4200/recipes/new opens the NewRecipeComponent instead?