mardi 2 mai 2017

I need the Ember equivalent of jQuery's .ready.. FOR EVERY PAGE

I know that there are several questions on this, and several answers that people say worked for them, but the answers all don't work for me, the posters posting the answers don't tell which file to put the code snippets in (there are dozens of places it could go), and I can't comment asking if they could be more specific because I don't have 50 reputation.

I want the code to run:

  1. On every page reload
  2. AFTER everything is loaded

Actually two methods. One that doesn't fire on transitions (ie this.transitionTo()) and one that does.

and I need to know exactly where to put the code, what file, where and in what way.

I have read about init functions and afterRender hooks but none work because the answers do not clarify where to put the code.

Thanks bunches!




Aucun commentaire:

Enregistrer un commentaire