A
A
Alex102142021-05-17 11:59:11
Angular
Alex10214, 2021-05-17 11:59:11

How to find selected value in drop down list?

Hello everyone, tell me how to find the selected value in the drop-down list.

<div class="box-for-select">
      <mat-form-field appearance="standard">
        <mat-select>
          <mat-option *ngFor="let option of testArr">
            {{option}}
          </mat-option>
        </mat-select>
      </mat-form-field>
    </div>


I created a test array and display it in the select, but I don't quite understand how I can take the selected object from the list and put it into a new array. I'm just learning and don't quite understand. Tell me please.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Shvets, 2021-05-17
@Alex10214

Easy to google
https://stackblitz.com/edit/angular-material-selec...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question