refactor to define helper service more accurately

This commit is contained in:
itzMiney committed 2026-03-17 23:21:12 +01:00
1 parent 5527acfb6a
commit 7618e4bf5d
28 files changed
+78 -403

No files matched your search

+4 -4
View File
@@ -1,6 +1,6 @@
import {Component, OnInit} from '@angular/core';
import {NavigationEnd, Router, RouterLink} from '@angular/router';
import {DeviceDetectorService} from '../services/device-detector.service';
import {ViewportService} from '../services/viewport.service';
import {filter} from 'rxjs/operators';
import {TranslatePipe, TranslateService} from '@ngx-translate/core';
@@ -16,14 +16,14 @@ import {TranslatePipe, TranslateService} from '@ngx-translate/core';
export class NavbarComponent implements OnInit {
currentLang: string;
activeLink: string = '';
isMobile: boolean = false;
isNarrow: boolean = false;
constructor(
private router: Router,
private deviceService: DeviceDetectorService,
private deviceService: ViewportService,
private translate: TranslateService
) {
this.isMobile = this.deviceService.isMobile;
this.isNarrow = this.deviceService.isNarrow;
this.currentLang = this.translate.currentLang || this.translate.getDefaultLang() || 'en';
}