NbSelect prefix value
- Vorherrschende Sprache
- TypeScript
- Sterne
- 8.1k
- Forks
- 1.5k
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Hello,
I have a problem to prefix a value in my NbSelect.
Here is a part of my document.component.ts :
```
ngOnInit() {
this.documentForm = this.fb.group({
id: [this.factUpdate.id],
connectorId: [this.factUpdate.connectorId, Validators.required],
actualizationInterval: [this.factUpdate.actualizationInterval, [Validators.required, Validators.min(this.ActualizationIntervalMinValue)]],
});
}
```
and my document.component.html :
```
Title
{{ item.name }}
Connector is required
Validate
```
I use ngModel in my other NbSelect for prefix value but here, there is formControlName and it's not compatible with ngModel.
So, I tried to use reactive forms :
```this.documentForm.get('connectorId').setValue(1);```
But it didn't work.
How can i prefix NbSelect with value using formControlName ?
Thanks for your help,
Kévin
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.