Skip to Content
avatar image
Former Member

load() not triggering after deploying to server.

Hi Everyone,

I am using browser load() inside onInit() method as below,

This is working perfectly while am running locally in Eclipse.

But after deploying to server "load()" is not executing.

Kindly help....

Thanks,

Srinath

load.png (7.2 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Mar 11, 2017 at 09:26 AM

    Hi Srinath,

    Seems like you have kept it in controller, any specific reason? Window loads independent of view, and the method would be called on window load.

    Regards,

    Swaroop

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Swaroop Anasane

      I am running in Chrome and same behavior can bee seen in IE as well.

      One difference between the code i have from local VS server is, "minification of JS files".

      In server, if i enable debugging mode (removing minification of js files) then load() is firing.

      Thanks,

      Srinath

  • Mar 11, 2017 at 11:58 AM

    why you depend on this? cannot put it in component init?

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Jun Wu,

      Thank you for the response.

      We need to call odata service inside onInit() and in order to identify how the page is rendering (either on refresh OR first time).

      From the load() we get 1 on refresh and 0 on first time launch. Based on the Number i will make odata call.

      Thanks,

      Srinath