Guest User

Untitled

a guest
May 24th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. fetchProductTypeForCategory(event) {
  2. let category = event.srcElement.attributes.value || event.currentTarget.value;
  3. this.productTypeSrv.fetchProductTypesParam(category)
  4. .subscribe(res => {
  5. this.productTypes = res;
  6. }, err => {
  7. console.log(err);
  8. })
  9. }
  10.  
  11. <select class="form-control" [formControl]="subCategoryForm.controls['l1category']" (change)="fetchProductTypeForCategory($event)">
  12. <option *ngFor="let item of categorys" [value]="item.id">{{item.name}}</option>
  13. <!-- <option *ngFor="let item of categorys" [value]="item.slug">{{item.name}}</option> --> // need this in order to submit the form
  14. </select>
Add Comment
Please, Sign In to add comment