Reputation: 835
I want to page rendering time select the placeholder option in that select box value empty string
or undefined
or null
It's worked only one value(empty string
).
But I want the above three value(empty string
or undefined
or null
)
My requirement solution for my guess is values with Or-symbol in option.
For ex:
<option [value]="''||undefined||null" disabled selected>Select Product</option>
But it does not work. If anybody knows that solution share with me
Upvotes: 0
Views: 750
Reputation: 23869
[value]
cannot accept a logical expression. Simply, assign the value ''
to the model when you see that the model is null
or undefined
:
this.item.genericByProd = this.item.genericByProd || '';
Upvotes: 1