-1

I am heaving routing rules like this.

{ path: 'index', component: IndexComponent
    , children:
      [ 
        { path: '', redirectTo:'profile',pathMatch:'full'},
        { path: 'profile',  outlet: "inner", component: ProfileComponent },
// some other rules
      ]
}

here I am using two router outlests, primary & inner. Inside IndexComponent.html inner outlet is present. When I use http://localhost:4200/index at URL, Only primary router-outlet works, inner does not get updated. My expectation is to show ProfileComponent in inner router-outlet OR to redirect /index rule to /index/orders/(inner:profile) with using IndexComponent in primary router-outlet.

mukund patel
  • 1,039
  • 10
  • 31

1 Answers1

0

Try this.

{ path: '', redirectTo:'/(inner:profile)',pathMatch:'full'}

But if you root path is empty or use lazy loaded module, You can follow this PR(angular/pull/25483)

Hsuan Lee
  • 2,300
  • 1
  • 10
  • 18