Skip to content

Instantly share code, notes, and snippets.

@petyosi
Created February 9, 2018 15:05
Show Gist options
  • Save petyosi/95d6cded54ce591c4bca289712e1df04 to your computer and use it in GitHub Desktop.
Save petyosi/95d6cded54ce591c4bca289712e1df04 to your computer and use it in GitHub Desktop.
@Component({
selector: 'grid-component',
template: `
<div class="row" *ngFor="let cellComponentType of cellComponentTypes">
<<div class="col-lg-12">
<grid-cell [componentType]="cellComponentType"></grid-cell>
</div>
</div>
`
})
export class Grid {
@Input() componentTypes: any;
cellComponentTypes: any[] = [];
addDynamicCellComponent(selectedComponentType:any) {
this.cellComponentTypes.push(selectedComponentType);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment