I have this TypeScript:
public sendAlertDays: Array<any> = [
{ value: [0, 1, 2, 3, 4, 5, 6], text: "all days" },
{ value: [0, 1, 2, 3, 4], text: "monday-friday" },
{ value: [5, 6], text: "saturday-sunday" },
{ value: [0], text: "monday" },
{ value: [1], text: "tuesday" },
{ value: [2], text: "wednesday" },
{ value: [3], text: "thursday" },
{ value: [4], text: "friday" },
{ value: [5], text: "saturday" },
{ value: [6], text: "sunday" }
];
sendAlertDay: number[] = [0];
My Angular template do not pre-select 'monday' yet I have initialized well sendAlertDay: number[] = [0]
<mat-select [(value)]="sendAlertDay" class="mat-primary">
<mat-option *ngFor="let day of sendAlertDays" [value]="day.value">
{{day.text}}
</mat-option>
</mat-select>