Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Add more controls to view
<label for="name">Enter Component Name</label>
<input type="text" id="name" [(ngModel)]="name" placeholder="Enter Dynamic Component Name">
<br />
<button (click)="addComponent()">Add Component</button>
<button *ngIf="hasDynamicComponents" (click)="removeComponent()">Remove Component</button>
<button *ngIf="hasDynamicComponents" (click)="clearComponents()">Clear All</button>
<ng-container #container></ng-container>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.