0
votes

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?

EDIT: Here is a gist of the application.hbs and sidebar.js files:

Gist Files

1
is the sidebar a component? What kind of dropdown is this? A custom one or any library? Anyway, without some code it's hard to answer. - Jeff
No the sidebar is just in the application.hbs template. I believe it may be metis menu. I'll update my post with code. - spacerobot
I think I'm all set now. I installed ember-metismenu and the issue is not happening anymore. Thanks for your help. - spacerobot

1 Answers

0
votes

Installed ember-metismenu and the issue went away.