import { Component , OnInit } from '@angular/core' ; import { UserAuthService } from '../../services/user-auth.service' ; import { Router , ActivatedRoute } from '@angular/router' ; import { EnvironmentsService } from 'app/services/environments.service' ; @ Component ( { styleUrls : [ './home.component.scss' ] , templateUrl : './home.component.html' , } ) export class HomeComponent implements OnInit { constructor ( private route , private userAuthService , public env ) { } ngOnInit ( ) { this . route . queryParams . subscribe ( ( params ) => { const isUserLandingFromOutside = ! params [ 'hash' ] || String ( params [ 'hash' ] ) . length == 0 ; if ( isUserLandingFromOutside ) { const user = this . userAuthService . loggedUser ( ) ; } } ) ; } }