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 -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -