I have in my angular app routing, and I need dynamically render components in router-outlet element. I need style router-outlet as container of rendered components, but when I set him width, all content will be pushed, and I find out it is not in router-outlet as you can see on picture.
App-messenger tag should be in router-outlet.
Here is my home component which contains router-outlet:
<div class="container-fluid h-100 d-flex">
<div class="d-flex h-100">
<app-navbar class="flex-column h-100 flex-fixed-column-100"></app-navbar>
</div>
<router-outlet class="d-flex w-100"></router-outlet>
</div>
and router configuration:
const appRouter: Routes = [
{ path: '',
component: AuthComponent,
children: [
{ path: '', component: SignInComponent },
{ path: 'sign-up', component: SignUpComponent }
]},
{ path: 'home', component: HomeComponent,
children: [
{ path: '', component: MessengerComponent},
{ path: 'posts', component: UsersPostsListComponent },
{ path: 'contacs', component: ContactsListComponent }
]},
{ path: '**', redirectTo: '', pathMatch: 'full' }
];
EDIT
I've also tried wrap router-outlet, but also my content was pushed, and I d not know as you can see on second picture. I do not have any other styles except for bootstrap classes which you can see.
thats normal behaviour. router-outlet is not the parent element of the content. You need some wrapping around it.
EDIT: Try adding flex-column on the UL Element like this