Answers for "angular child routes not working"

0

angular child routes not working

When you use children inside of your routes the parent component needs to have <router-outlet></router-outlet> inside it's html in order for the children to be loaded inside that parent. Angular Docs on Child Configuration

Additionally, with routed components it is not necessary to add the component selector inside the html of the parent component as they will be injected automatically by the router below your router-outlet.

<router-outlet></router-outlet>

more infos https://angular.io/guide/router#child-route-configuration
Posted by: Guest on February-03-2022

Code answers related to "angular child routes not working"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language