jeudi 2 juillet 2015

Ember.js: Route-dependent Menu

Ive got a Template which defines an <div id="sidemenu"><ul>...</ul></div>.It should has some <li>-Elements which represents general available-Menu-Items. On Sub-routes I want to add some additional menu-entries which only make sense on that routes. But since the div where to put the li's into is defined in the parent-route-template, I dont know how I should implement this.

My first theoretical approach was to call a controller function which returns the neccessary li's. I could override this function in each sub-controller but i dont know if this is good practice.

However I want to do it in a ember-vanilla way if possible (some guys told me to use a plugin called "wormhole" or something)




Aucun commentaire:

Enregistrer un commentaire