Created
February 9, 2018 15:05
-
-
Save petyosi/95d6cded54ce591c4bca289712e1df04 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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