Router and App Main View creation order

edited October 2013 in Enyo 2.4
Is there a way to preserve order in which enyo.Application.view and router controller are created ?

At the moment I have a situation where router is created first and I can not create application part that is dependent on Main view of Application...

Comments

  • edited October 2013
    You can use enyo.ready() to delay creation of the router until the page is ready. Then, you create your Application object from the script tag.
  • That's a great idea Ben, thank you.
    I recently implemented a different solution for my project. I created an arbitrary loaded property to the kind. When the router fires to change the page, I checked loaded. If it is false, I place an observer (addObserver) on to loaded to fire the new page loading function. I like the versatility it provided me to dictate when the change happens.
Sign In or Register to comment.