How to use ngFor and ng-select together

as shown in the picture, I want to achieve a font selection effect, and the font data is obtained from the background. I used ngFor loop display, but I need to use ng-selected to select fonts. I don"t know how to use ngFor to combine ng-selected. The code is as follows

<select id="fontstyle" name="fontstyle" class="selectpicker"(change)="setFont($event.target.value);">
   <option *ngFor="let item of dto.fontStyles" [value]="item.font">{{item.name}}</option>
</select>

it is not clear how to implement ng-selected. Please consult the platform god

.
May.27,2022

if you want to get the selected option value, add a bi-directional binding variable in select : [(ngModel)] = "selectedFont" , angular does not use the previous generation ng-select usage, selectedFont is your own defined variable to store fonts, and then you can use it to do something else.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3850f-2c119.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3850f-2c119.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?