When first and following time user enters the page, placed button is not focused and highlighted by gray color. I tried to set autofocus:
<button mat-raised-button color="primary" autofocus>{{'recovery' | translate}}</button>
I consider that it is imperfection of Material buttons.
How to set focused material button in last Angular?
You can just set focus to the button at component's life-cycle hook ngAfterViewInit for example:
<button mat-raised-button color="primary" #btnRef="matButton">{{'recovery' | translate}}</button>
...
@ViewChild('btnRef') buttonRef: MatButton;
...
ngAfterViewInit() {
this.buttonRef.focus();
}
...
Hope that helps.