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
@@ -2,7 +2,7 @@ import {Component, Inject, OnInit, PLATFORM_ID} from '@angular/core';
|
||||
import {AuthService} from '../shared/services/auth.service';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
import {DeviceDetectorService} from '../shared/services/device-detector.service';
|
||||
import {ViewportService} from '../shared/services/viewport.service';
|
||||
import { Title } from '@angular/platform-browser';
|
||||
import { take } from 'rxjs/operators';
|
||||
import {ParallaxComponent} from '../shared/parallax/parallax.component';
|
||||
@@ -25,21 +25,21 @@ export class LoginComponent implements OnInit {
|
||||
'/admin',
|
||||
'/shortener'
|
||||
]);
|
||||
isMobile = false;
|
||||
isNarrow = false;
|
||||
redirectUrl = '/admin';
|
||||
|
||||
constructor(
|
||||
private authService: AuthService,
|
||||
private router: Router,
|
||||
private route: ActivatedRoute,
|
||||
private deviceService: DeviceDetectorService,
|
||||
private deviceService: ViewportService,
|
||||
private titleService: Title,
|
||||
@Inject(PLATFORM_ID) private platformId: Object
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.titleService.setTitle('Login | itzMiney')
|
||||
this.isMobile = this.deviceService.isMobile;
|
||||
this.isNarrow = this.deviceService.isNarrow;
|
||||
|
||||
this.route.queryParams.pipe(take(1)).subscribe(params => {
|
||||
const raw = params['redirectUrl'];
|
||||
|
||||
Reference in new issue
Block a user