Created
May 12, 2019 16:47
-
-
Save bariscanyilmaz/20bc13459de666990bfa1af4f8c9e0db to your computer and use it in GitHub Desktop.
This file contains 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
<div class="book-form-categories" formArrayName="bookCategories" | |
*ngFor="let item of addBookForm.get('bookCategories')['controls']; let i = index;"> | |
<mat-form-field [formGroupName]="i" class="book-form-category"> | |
<mat-label>Book Category</mat-label> | |
<mat-select formControlName="bookCategory" required> | |
<mat-option *ngFor="let category of data" [value]="category.Name"> | |
{{category.Name}} | |
</mat-option> | |
</mat-select> | |
</mat-form-field> | |
<button *ngIf="i!=0" mat-button (click)="removeCategoryControl(i)"> | |
<mat-icon>delete</mat-icon> | |
</button> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment