Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fetchProductTypeForCategory(event) {
- let category = event.srcElement.attributes.value || event.currentTarget.value;
- this.productTypeSrv.fetchProductTypesParam(category)
- .subscribe(res => {
- this.productTypes = res;
- }, err => {
- console.log(err);
- })
- }
- <select class="form-control" [formControl]="subCategoryForm.controls['l1category']" (change)="fetchProductTypeForCategory($event)">
- <option *ngFor="let item of categorys" [value]="item.id">{{item.name}}</option>
- <!-- <option *ngFor="let item of categorys" [value]="item.slug">{{item.name}}</option> --> // need this in order to submit the form
- </select>
Add Comment
Please, Sign In to add comment