Guys I’m having this error in my code
Error: Uncaught (in promise): TypeError: Cannot read property 'undefined' of undefined
TypeError: Cannot read property 'undefined' of undefined
at ConteudoPage.webpackJsonp.271.ConteudoPage.ngAfterContentInit (http://localhost:8100/build/main.js:4315:40)
at callProviderLifecycles (http://localhost:8100/build/vendor.js:12776:18)
at callElementProvidersLifecycles (http://localhost:8100/build/vendor.js:12753:13)
at callLifecycleHooksChildrenFirst (http://localhost:8100/build/vendor.js:12737:17)
at checkAndUpdateView (http://localhost:8100/build/vendor.js:13865:5)
at callViewAction (http://localhost:8100/build/vendor.js:14212:21)
at execComponentViewsAction (http://localhost:8100/build/vendor.js:14144:13)
at Object.checkAndUpdateView (http://localhost:8100/build/vendor.js:13868:5)
at ViewRef_.detectChanges (http://localhost:8100/build/vendor.js:11654:18)
at NavControllerBase._viewAttachToDOM (http://localhost:8100/build/vendor.js:54175:40)
at c (http://localhost:8100/build/polyfills.js:3:19752)
at Object.reject (http://localhost:8100/build/polyfills.js:3:19174)
at NavControllerBase._fireError (http://localhost:8100/build/vendor.js:53938:16)
at NavControllerBase._failed (http://localhost:8100/build/vendor.js:53931:14)
at http://localhost:8100/build/vendor.js:53978:59
at t.invoke (http://localhost:8100/build/polyfills.js:3:14976)
at Object.onInvoke (http://localhost:8100/build/vendor.js:4983:33)
at t.invoke (http://localhost:8100/build/polyfills.js:3:14916)
at r.run (http://localhost:8100/build/polyfills.js:3:10143)
at http://localhost:8100/build/polyfills.js:3:20242
I am finding the error in this line of code, the error is being found in this IF, could someone help me?
ngAfterContentInit(){ console.log('Carregando After') this.loading.present();
this.events.subscribe('aulaConteudo:loadingVideo', () =>{
this.exibirConteudo = false;
let monitor:HTMLDivElement = this.content._elementRef.nativeElement.querySelector('.monitor');
monitor.style.visibility = 'hidden';
});
console.log(this.navParams)
this.aula = this.navParams.data.aula;
this.aulaOrdem = this.navParams.data.aulaOrdem;
this.moduloOrdem = this.navParams.data.moduloOrdem;
this.cursoId = this.navParams.get('cursoId');
this.usuario = this.navParams.get('usuario');
this.tituloCurso = "teste"; //this.aula.tituloCurso;
this.paginasTotal = 8;
if (this.aulaOrdem == 1 && this.moduloOrdem == 1) {
this.prev = true;
}
if (this.aulaOrdem == this.aula[this.moduloOrdem].aulas.length - 1 && this.moduloOrdem == this.aula.length - 1) {
this.next = false;
} `
2 posts - 2 participants