refactor to define helper service more accurately
This commit is contained in:
1 parent
5527acfb6a
commit
7618e4bf5d
28 files changed
+78
-403
No files matched your search
@@ -1,5 +1,5 @@
|
||||
import {Component, OnInit} from '@angular/core';
|
||||
import {DeviceDetectorService} from '../services/device-detector.service';
|
||||
import {ViewportService} from '../services/viewport.service';
|
||||
|
||||
import {NavigationEnd, Router, RouterLink} from '@angular/router';
|
||||
import {TranslatePipe, TranslateService} from '@ngx-translate/core';
|
||||
@@ -17,15 +17,15 @@ import {TranslatePipe, TranslateService} from '@ngx-translate/core';
|
||||
export class MobileNavbarComponent implements OnInit{
|
||||
currentLang: string;
|
||||
menuOpen = false;
|
||||
isMobile: boolean = false;
|
||||
isNarrow: boolean = false;
|
||||
activeLink: string = '';
|
||||
|
||||
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';
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user