Topic: MDB Select Angular 2 Issue
mog5808
pro
asked 5 years ago
<div class="col-xs-12 col-sm-6 col-md-4">
<select class="mdb-select" formControlName="role">
<option value="'travel_agent_r'">Auditor</option>
<option value="'travel_agent_support'">Customer Support</option>
<option value="'travel_agent_r_w'">Data Entry</option>
<option value="'travel_agent'">Full Access</option>
<option value="'travel_agent_sales'">Sales</option>
</select>
<label>Role *</label>
</div>
And this is my typescript
this.myForm = new FormGroup({
role: new FormControl('', [<any> Validators.required, CustomValidators.notEqual('')]),
});
any ideas?
Piotr Bender
free
answered 5 years ago
Hello,In response to your issue, I wanted to let you know about just released MDBootstrap Angular kit, that may be a sufficient solution to this or any other issues you have had with Angular integration so far.The kit can be found at the following link:https://mdbootstrap.com/angular/It contains all the components you could find in MDB jQuery version.We encourage you to try it out and report any bugs or issues at contact@mdbootstrap.com with [Angular] prefix or create a thread on this forum.Have a great day!
Rafał Rogulski
free
answered 5 years ago
mog5808
pro
answered 5 years ago
.mdb-select
although i liked it alot.
If someone finds a solution let me know.
Here is how i get the value now,
const newFormValues = this.myForm.valueChanges;
newFormValues.subscribe((data) => {
console.log(data.role);
});
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
- User: Pro
- Premium support: No
- Technology: MDB Angular
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No