You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Content Projection is a pattern in which we insert or project.
The content that we want to use inside another component.
As an example, we could have a Card component that accepts content provided bu another component.
Single-slot content projection
This is basically slot if we want to display element in other element
We are providing it by using ng-content.
@Component({selector: "app-zippy-basic",template: ` <h2>Single-slot content projection</h2> <ng-content></ng-content> `,})`<app-zippy-basic> <p> test test test </p></app-zippy-basic>`
Multi-slot component projection
A component can have multiple slots.
Each slot can specify a CSS selectors that determines which
content goes into that slot.
we can handle this problem by using select attribute of ng-content