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

The SDK directory does not exist (ubuntu 16.04) (react native) -

python - How to clone or copy a list? -

python - How to use Celery in Tornado with redis as broker and backend? -