-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: Cannot read property 'querySelector' of undefined #10
Comments
Thanks @hughred22 !! I'll try to check this out soon and if everything is good merge it in |
Awesome! |
Also encountered this. |
FYI: This can also happen when you try to show a banner before the active view ( |
@davej What do you mean "before" the active view? You won't see it if you show it before the active view. The banner should show at the active view in order to be seen. |
I have |
Instead of setTimeout, put your call in timeout() command. You need to wait till the ion-view is created before calling show(). timeout() with fix the digest circle for you and make sure show() is called last. |
Yeah I understand the issue. I fire the function call on the |
I have the same issue and even a timeout is not working for me. |
+1 |
The same error. $timeout/setTimeout does not help. Any news on this issue @djett41 ? |
Also for non-scrollable content areas: getActiveView(body).querySelector('.scroll-content-false').appendChild(element[0]); |
$timeout( ..., 200) helped me. |
I had to set timeout to be 1000 to fix the problem. It's better to wait until your view becomes fully active to call show(); |
I have the ionic content banner in a side menu content view. And it throw error:
TypeError: Cannot read property 'querySelector' of undefined
It regard to this line of code: getActiveView(body).querySelector('.scroll-content').appendChild(element[0]); line 149
What is going wrong? Could you fix that?
The text was updated successfully, but these errors were encountered: