I have the following JSON structure that I want to show using component:
const rootBlock = {
id: 1,
fields: [],
blocks: [{
id: 2,
fields: []
blocks: []
}]
} as Block;
There is component BlockComponent.
@Input() block: Block;
I want to show all nested component inside one, how to do that using projection?
<app-block>
<app-block></app-block>
</app-block>
<div class="block"><div>id: {{block.id}}</div><div class="nestedBlocks"></div></div>