Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Angular header component that includes logo component

I have two components: header and logo and I want the logo inside of the header. Currently I don’t have any significant code for the header component which is intentional because there is nothing else that needs to go inside of it besides the logo right now.

I need help on how to include the logo inside the header component. The logo is the child of the header.

Here is my stackblitz code

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

https://stackblitz.com/edit/stackblitz-starters-vo4y44?file=src%2Flogo.component.html

>Solution :

You can see in logo.component.ts you have the selector (app-logo), you can use <app-logo /> in other components.

Edit: don’t forget to add "LogoComponent" in your app.module.ts

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading