Error: Uncaught (in promise): Error: Cannot match any routes RC4 Child Routes Error: Uncaught (in promise): Error: Cannot match any routes RC4 Child Routes angularjs angularjs

Error: Uncaught (in promise): Error: Cannot match any routes RC4 Child Routes


When your Route configuration is set to below

{  path:'movie-home',  component:HomeComponent}

There is only one route that Angular interprets and that is movie-home and hence everything works fine

Now when you change your config to this

{  path:'movie-home',  component:HomeComponent,  children:[    {path : 'animation' , component:AnimationComponent},    {path : 'action' , component:ActionComponent}  ]}

Angular now knows of only two routes ie. movie-home/animation and 'movie-home/action'. There is no movie-home route because you don't have pathless route in children.Following config should fix your issue

{  path:'movie-home',  children:[    {path : '' , component:HomeComponent},    {path : 'animation' , component:AnimationComponent},    {path : 'action' , component:ActionComponent}  ]}

Make sure you are on beta.2 version or above when it releases of router v3

For more details refer to http://victorsavkin.com/post/146722301646/angular-router-empty-paths-componentless-routes