Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- article: Article;
- mainGroups: Group[];
- subGroups: Group[];
- ngOnInit() {
- this._groupService.getAll().subscribe(groups => this.mainGroups = groups);
- this._groupService.getAllSubGroups().subscribe(subgroups => this.subGroups = subgroups);
- }
- <div class="form-group">
- <label class="control-label dash-control-label col-xs-3">Main group:</label>
- <div class="col-xs-9">
- <select class="form-control dash-form-control select2" style="width: 100%;"
- data-minimum-results-for-search="Infinity" name="articleGroups" required [(ngModel)]="article.mainGroup">
- <option disabled [ngValue]="null">-/-</option>
- <option [ngValue]="group" *ngFor="let group of mainGroups">{{group.title}}</option>
- </select>
- </div>
- </div>
- <!--Sub group-->
- <div class="form-group">
- <label class="control-label dash-control-label col-xs-3">Sub group:</label>
- <div class="col-xs-9">
- <select class="form-control dash-form-control select2" style="width: 100%;" name="subGroup" required [(ngModel)]="article.subGroup">
- <option disabled [ngValue]="null">-/-</option>
- <option [ngValue]="subgroup" *ngFor="let subgroup of subGroups">{{subgroup.title}}</option>
- </select>
- </div>
- </div>
- <select class="form-control" [(ngModel)]="size" name="sizeValue" #sizeValue="ngModel">
- <option *ngFor="let size of sizes" [value]="size">{{size}}</option>
- </select>
Add Comment
Please, Sign In to add comment