ember.js - My Model is not called when page loads -


when new page loades trying fetch data in route not getting response model method. rest of other methods called. wrong here?

here code :

import ember 'ember';  export default ember.route.extend({     model(params){ //not calling         console.log('got model', params );         return this.store.peekrecord('card-list', params.id );     },      setupcontroller(controller,model) {//called         console.log("super")         this._super(...arguments);         console.log("model is", controller,"\n", model );     },      init(){//called         console.log("init calledx");      }  }); 

update

router.map(function() {   this.route('review');   this.route('confirmation');    this.route('cs2i', function() {     this.route('balance', function() {       this.route('balancedetails');       this.route('balanceedit', { path: '/balanceedit/:id' });       this.route('balancereview', { path: '/balancereview/:id' });     });      this.route('purchase', function() {       this.route('purchasedetails');       this.route('purchaseedit');       this.route('purchasereview');     });   }); 


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -