Skip to content
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

ionViewDidLoad does not have scope for global variable #8805

Closed
Purus opened this issue Oct 19, 2016 · 2 comments
Closed

ionViewDidLoad does not have scope for global variable #8805

Purus opened this issue Oct 19, 2016 · 2 comments
Labels
needs: reply the issue needs a response from the user

Comments

@Purus
Copy link
Contributor

Purus commented Oct 19, 2016

Short description of the problem:

The object that I declared is not available inside ionViewDidLoad event cycle method.

ionViewDidLoad() {
    if(Appodeal) Appodeal.show(Appodeal.INTERSTITIAL);
}

I am getting the below issue.

Appodeal is not defined

The following declaration is done.

declare var Appodeal;

But the same code works fine inside other functions present in the same page component.

What behavior are you expecting?

The object declared should be available inside the cycle method.

@Purus
Copy link
Contributor Author

Purus commented Oct 20, 2016

Is this related to #8449?

@jgw96
Copy link
Contributor

jgw96 commented Oct 20, 2016

@Purus this does sound related to that issue. Can you put the above logic in your example in ionViewDidEnter and see if it works there? Thanks!

@jgw96 jgw96 added v2 needs: reply the issue needs a response from the user labels Oct 20, 2016
@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs: reply the issue needs a response from the user
Projects
None yet
Development

No branches or pull requests

3 participants