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 -

Python Tornado package error when running server -

Qt QGraphicsScene is not accessable from QGraphicsView (on Qt 5.6.1) -