mercredi 5 juillet 2017

The correct and clean way to not render a child template in a parent template in Ember

I am overhauling an old project to use ember with firebase for persisting data. It is a restaurant site, I added authentication and I am allowing admin users to add and delete menu items from the restaurant's menu.

My route is set up as follows

Router.map(function() {
  this.route('menu', function() {
    this.route('add');
  });

the model functions are working properly but due to the nested route as you add menu items, the menu template grows and grows and pushes the add form way beneath the fold. My question is what is the correct way to get it so that localhost/menu doesn't render when you are on localhost/menu/add?




Aucun commentaire:

Enregistrer un commentaire