Guest User

Untitled

a guest
Apr 19th, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. article: Article;
  2. mainGroups: Group[];
  3. subGroups: Group[];
  4.  
  5. ngOnInit() {
  6. this._groupService.getAll().subscribe(groups => this.mainGroups = groups);
  7. this._groupService.getAllSubGroups().subscribe(subgroups => this.subGroups = subgroups);
  8. }
  9.  
  10. <div class="form-group">
  11. <label class="control-label dash-control-label col-xs-3">Main group:</label>
  12. <div class="col-xs-9">
  13. <select class="form-control dash-form-control select2" style="width: 100%;"
  14. data-minimum-results-for-search="Infinity" name="articleGroups" required [(ngModel)]="article.mainGroup">
  15. <option disabled [ngValue]="null">-/-</option>
  16. <option [ngValue]="group" *ngFor="let group of mainGroups">{{group.title}}</option>
  17. </select>
  18. </div>
  19. </div>
  20.  
  21. <!--Sub group-->
  22. <div class="form-group">
  23. <label class="control-label dash-control-label col-xs-3">Sub group:</label>
  24. <div class="col-xs-9">
  25. <select class="form-control dash-form-control select2" style="width: 100%;" name="subGroup" required [(ngModel)]="article.subGroup">
  26. <option disabled [ngValue]="null">-/-</option>
  27. <option [ngValue]="subgroup" *ngFor="let subgroup of subGroups">{{subgroup.title}}</option>
  28. </select>
  29. </div>
  30. </div>
  31.  
  32. <select class="form-control" [(ngModel)]="size" name="sizeValue" #sizeValue="ngModel">
  33. <option *ngFor="let size of sizes" [value]="size">{{size}}</option>
  34. </select>
Add Comment
Please, Sign In to add comment