1

I need to make this redirect with relative path. Is it possible?

{
path: 'path1',
    component: componentOne,
    children: [
    {
        path: 'child',
        redirectTo: 'path2'
    }
}
{
    path: 'path2'
    component: componentTwo
}

I've tried smth like this redirectTo: '../path2' and it isn't work.

Dmytro
  • 48
  • 6

1 Answers1

0

use an absolute path '/' that might help you , like below

children: [ { path: 'child', redirectTo: '/path2' } additionally you can refer

Angular 2 routing redirect to with child routes

pavan kumar
  • 823
  • 6
  • 15