jeudi 23 juin 2016

Show parent template with next one

I have navigation bar and after clicking that bar disapears, but if I go straight to necessary url the bar appears.

Router:

  Router.map(function () {
  this.route('apis', function () {
    this.route('show', {
      path: '/:api_id'
    });
  });
});

Router apis/index:

import Ember from 'ember';
export default Ember.Route.extend({
  model() {
    return this.store.findAll('api');
  }
});

Router apis/show:

import Ember from 'ember';
export default Ember.Route.extend({
  model() {
    return this.store.findAll('api');
  }
});

Template apis/index and apis/show (same):

 <div class="panel-body">
       
               
                    
               
       
 </div>

So if I go to /apis or /apis/1 the bar is showing, but if I go from /apis to /apis/1 by clicking on link, the bar is not showing.




Aucun commentaire:

Enregistrer un commentaire