jeudi 29 mars 2018

ember issue with template sidebar display

With Ember I have a login page that I do not want to display the header/sidebar navigation for my site. Once isAuthenticated then I want them to show. I can get this to work by checking for session.isAuthenticated in application.hbs. If true I show the header and sidebar if not I do not display them.

This all works but once I login and transition to the default authenticated route the javascript for the sidebar dropdown does not work. When I click the links nothing happens. If I then transition to a different route they work. I'm guessing it's since I am not generating them when I first load the page because I am not authenticated.

Is there a better way to handle this or force a reload of the javascript?




Aucun commentaire:

Enregistrer un commentaire