I am beginner to Angular
I have a task to add validation if Dropdown list is not selected I have to hide button
here is that code
button function
<input type="file" class="custom-file-input" multiple (change)="onDealPriceFileChangeHandler($event)" accept=".xlsx" />
Dropdown list code
<div class="form-group">
<label class="label" for="nights">Number of Nights</label>
<nb-select fullWidth placeholder="Select Number of Nights" >
<nb-option *ngFor="let night of nights" [value]="night.value"
(selectionChange)="nightHanlder(night.value)">{{night.name}}
</nb-option>
</nb-select>
</div>
Night Array
nights = [
{ value: 1, name: '1 Night' },
{ value: 2, name: '2 Nights' },
{ value: 3, name: '3 Nights' },
]
night change function
nightHanlder(code){
this.selectNight=code;
}
I need to add an alert if dropdown is not selected