Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

157
Vistas
Angular browser version returns value as null when URL is called

Facebook wants to check out my privacy page that i put in the developers dashboard. So far so good. Now in the mysite.com/privacy i am calling a variable that is set from home page (mysite.com) so when they hit on their browser the privacy page (mysite.com/privacy) without visiting first the home page (mysite.com) then obviously the value is not set.

this is the error i am getting

  ERROR TypeError: ctx.userDetails is null
MainHeaderComponent_Template template.html:9 

.html page <div class="login-header-block" *ngIf="userDetails.username!='guest'">

.ts page

constructor(
private userData: UserData,
private router: Router,
private alertCtrl: AlertController,
  ) { 

this.userDetails = this.userData.getUserData();
this.getNotifications();
}

I want to be able to keep the ngIf but i want it to show the page without errors

any help

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda