My router-outlet is located in FullLayoutComponent, and my navigation menu routes are located in that template.
The first children array you see below are navigation menu routes. The children array in 'apartments' are some routes from different template located in ApartmentsComponent.
I am getting the error:
Cannot find primary outlet to load 'ApartmentItemsComponent'
I have tried moving the apartment-items outside of the children, but then my route is wrong.
It is Home > Apartment Items, and it should be Home > Apartments > Apartment Items
path: '',
component: FullLayoutComponent,
data: {
title: 'Home'
},
children: [
{
path: 'apartments',
component: ApartmentsComponent,
data: {
title: 'Apartments'
},
children: [
{
path: 'apartment-items',
component: ApartmentItemsComponent,
data: {
title: 'Apartment Item'
}
}]
},.....
How can I make apartment-items recognise my main router-outlet?
EDIT: To explain it more on what I want to achieve.
So basically, when I press view more, I would like to render Apartment Items component in that main router outlet.
So my route would look like Home / Apartments / Apartment Item.
If I remove Apartment Items from children, my route will look like Home / Apartment Item. But if I leave it in children then I get that error I posted above.
