Preview:
#AppComponent
ngOnInit() {
    this.translateService.setDefaultLang('ar');
    let historyState = JSON.parse(localStorage.getItem('historyState')!) as object;
    if (historyState) {
      history.pushState(historyState, "")
      localStorage.removeItem('historyState')
    }
  }
  @HostListener('window:beforeunload') getHistoryState() {
    if (history.state)
      localStorage.setItem('historyState', JSON.stringify(history.state));
  }
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter