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

270
Vistas
ngOnInit() not being invoked - even first time running the Ionic app

For an Ionic App that has implemented OnInit why is ngInit() not invoked? It is not happening even the first time the app/window is opened:

export class AudioRecorderComponent implements OnInit, OnDestroy {
   ...
  async ngOnInit() {
    console.log('ngOnInit()')  // never printed 
   ...

}

Is there a different way to get logic to be executed when creating an Ionic component?

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

While in theory ngOnInit should work, try using viewWillEnter instead.

https://ionicframework.com/docs/angular/lifecycle

export class AudioRecorderComponent implements viewWillEnter {

 ionViewWillEnter(): void {

     console.log('view will enter');
 }

}
about 4 years ago · Juan Pablo Isaza Denunciar

0

This was due to the GoogleVoice extension. After disabling the extension the ngOnInit() proceeded correctly

about 4 years ago · Juan Pablo Isaza Denunciar
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