hello I have a form with fields
<form [formGroup]="addform" (ngSubmit)="RegistrarArticulo()" class="form-horizontal addform">
<div class="form-group">
<div class="col-sm-7 col-xs-12">
<label>Marca</label>
<select formControlName="marca_mobile" name="marca_mobile" (change)="cambiaDatos()" class="selectpicker form-control bs-select-hidden" data-live-search="true" dropdown>
<option *ngFor="let menu of this._menu.menuesModel" value="1"> {menu.model}}</option>
</select>
</div>
</div>
<div class="buttons" id="submit">
<input class="btn btn-primary" value="Submit" type="submit">
</div>
</form>
when I try to see the value of that select it goes empty:
RegistrarArticulo() {
console.log(this.addform);
}
the form model that I have this way:
this.addform = new FormGroup({
marca_mobile: new FormControl('')
});
and these are the imports that I have:
import { AddListingService } from '../../services/add-listing.service';
import { Component, OnInit } from '@angular/core';
import { FormGroup, FormControl, ReactiveFormsModule } from '@angular/forms';
I CLARIFY THAT IF I REMOVE THE CLASSES THAT THE SELECT HAS IF IT WORKS