How can i reuse one component with different content in it. I have component quick-links that extends dashboard-panel component and has title and content. I want to reuse that quick-links component with different title and content
<dashboard-panel>
<span class="title">Getting Started</span>
<div class="content">
<div class="wrapper">
<div class="inner">
<a href="" target="_blank">
<i class="material-icons icon-promote">north_east</i>
<span>Promote Yourself</span>
</a>
</div>
<div class="inner">
<a href="" target="_blank">
<i class="material-icons icon-pro-page">stars</i>
<span>Set Up Pro Page</span>
</a>
</div>
<div class="inner">
<a href="" target="_blank">
<i class="material-icons icon-play">play_arrow</i>
<span>Set Up Blaze Player</span>
</a>
</div>
<div class="inner">
<a href="" target="_blank">
<i class="material-icons icon-soundcloud">
<img src="assets/img/service-logos/soundcloud.svg" alt="soundcloud" class="">
</i>
<span>SoundCloud Monetization</span>
</a>
</div>
</div>
</div>
</dashboard-panel>
like in this screen
I can only change title of this component by using @Input because it's only 1 line but what if i need to change whole content too. And what's the best way to achive that
You can use the Content projection, please read details about it here
Here's how you can reuse your
<dashboard-panel>component with different values inside of it:And here's how the projection works inside the component that receives a projected content (notice
<ng-content select="...">):Stackblitz