D
D
Demigodd2018-07-08 13:09:19
JavaScript
Demigodd, 2018-07-08 13:09:19

How to remove the options element if it is selected in the 1st Select?

How in AngularJs, to make it so that if in the first Input`e you select the Windwos option, for example, then the Windwos option in the second Input`e disappears?
And why is always the first element in the options visible as undefined ?
And if you remove ng-model, then the 1st option will not be undefined.
Link to JsFiddle

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2018-07-08
@Demigodd

So ? Well, or a custom filter can be done .

And why is always the first element in the options visible as undefined ?
And if you remove ng-model, then the 1st option will not be undefined.

Let's open the documentation and see that
If the viewValue of ngModel does not match any of the options, then the control will automatically add an "unknown" option, which it then removes when the mismatch is resolved.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question