ember.js - Index Route vs Custom Route causes application.hbs model issues -


i working ember 2.9, , i'm facing weird routing + model issue.

i have 2 routes identical (copied , pasted code inside route) except pathing. have 1 route '/', , route 'my-route'.

import ember 'ember';  export default ember.route.extend({     model() {         let dict = {             mylog1model: this.get('store').findall('my-log1'),             mylog2model: this.get('store').findall('my-log2'),             mylog3model: this.get('store').findall('my-log3'),             mylog4model: this.get('store').findall('my-log4')         };         return dict;     } }); 

when access ember application localhost/ model data displayed properly, when access localhost/my-route none of model data being passed around in application.hbs

application.hbs

<section class='container-fluid'>     <div class='row'>         <div class='col-md-6'>             {{control-panel model=model}}         </div>         <div class='col-md-6'>             {{log-panel model=model}}         </div>     </div>     </section> 

log-panel.hbs

{{mylog1 model=model.mylog1model}} {{mylog2 model=model.mylog2model}} {{mylog3 model=model.mylog3model}} {{mylog4 model=model.mylog4model}} 

ember tables takes here... mylog1.hbs

{{models-table     data=model     columns=columns     usenumericpagination=true}} 

as stated before works fine 'localhost/', not 'localhost/my-route'. idea why is?

i able resolve issue, loading application model data in application route. had no idea there difference between '/', , application route.


Comments

Popular posts from this blog

javascript - Create a stacked percentage column -

Optimising Firebase database by automatically overwriting data -

javascript - Angular UI-Grid customTemplate directive causing rows to load slowly/? -