reuse of components it not works using angular 12

Viewed 60

I created my services and my components, I inject component posts, services and sliders, acceuil component.

acceuil.component.html

<sliders [rowOfSliders]="rowSliders"></sliders>
<div class="container">
    <h2 class="mt-5">Nos Services</h2>
    <hr>
    <services [rowOfServices]="rowServices"></services>
    
    <h2 class="mt-5">Nos Actualites</h2>
    <hr>
    <posts [rowsOfPosts]="rowPosts"></posts> 
</div> 

and i inject menu and router-outlet in app.component.html.

app.component.html

<menu></menu>
<router-outlet></router-outlet>

everything works fine, in the menu there is blog, and I inject posts into blog components

blog.component.html

<div class="container">
    <h2 class="mt-5">Nos Posts</h2>
    <hr>
    <posts></posts>

</div>

when I click in the menu on blog it just displays Nos Posts, without posts.

menu.component.html

 <li class="nav-item">
            <a class="nav-link mr-3" routerLink="/blog">Blog</a>
</li>

routes-routing.module.ts

{path:"blog",component:BlogComponent},

I want to see where is the error

0 Answers
Related