Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

routes in angular

//app-routing.module.ts file
const routes: Routes = [
 
  // for simple path
  {
        path:'admin',component:UserHomeComponent
  }
  //child parent context
  {
    path:'',component:UserSideComponent,
    children:[
      {
        path:'home',component:UserHomeComponent
      },
      {
        path:'checkout',component:CheckoutComponent
      }]
  },
  
  
 ]
 
PREVIOUS NEXT
Tagged: #routes #angular
ADD COMMENT
Topic
Name
6+7 =