import { AfterViewInit , Component } from '@angular/core' ; import { Router } from '@angular/router' ; import { SettingsService } from '@services/settings.service' ; import { MatDialogRef } from '@angular/material/dialog' ; @ Component ( { templateUrl : './shortcuts.component.html' , styleUrls : [ './shortcuts.component.scss' ] } ) export class ShortcutsComponent implements AfterViewInit { constructor ( public dialogRef , private settingsService , private router ) { } public ngAfterViewInit ( ) { void this . router . navigate ( [ "/shortcuts/application" ] ) ; } public selectRoute ( $event , route ) { const old = document . querySelector ( ".tab-bar-item.selected" ) ; if ( old !== null ) { old . classList . remove ( "selected" ) ; } $event . target . classList . add ( "selected" ) ; this . navigateTo ( route ) ; } public navigateTo ( route ) { void this . router . navigate ( [ "/shortcuts/" + route ] ) ; } }