ember.js - Ember observer when session is active on page load -


i writing emberjs web application. have piece of code should run only when page has completed loaded , session authentication complete.

i tried setting observer on session.isauthenticated not seem working.

any thoughts?

thanks

you can use didtransition hook of particular route. need define in actions hash, , dont forget return true bubbling parent route. inside didtransition hook, if want run thing after page has been rendered, can try,

ember.run.schedule("afterrender",() => { //you code }); 

Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -