Check out example codes for "pathmatch angular". It will help you in understanding the concepts better.

Code Example 1

content_copy
      
      [{
  path: '',
  pathMatch: 'full',
  redirectTo: 'main'
}, {
  path: 'main',
  component: Main
}]

Learn ReactJs, React Native from akashmittal.com