Hello everybody,
I have a select with two options: yes and no;
if the user selects another select will appear.
i tried with * ngIf and (ionChange) but it doesn’t work!
anyway if you want to use a form, I would use a Formgroup element.
this.formItem: Formgroup;
ngOnInit() {
this.formItem = new FormGroup({
current: new FormControl(''),
});
etc etc.
}
The first solution works without a formgroup.
in the end the error was trivial, since in reality the template was:
<ion-select-option>
Yes
<ion-select-option>
then he saved me ’ yes ’ with spaces
…
but I have another question: if I had a button, which is disabled when the form is invalid. Since the ionic input appears it gives me the error
ERROR Error: NG0100: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: ‘false’. Current value: 'true’