ember.js - Ember manual url change does not update the page -


im in need of help. if come ember app url so

/#/clients/some-client/claims/123 

the page loads should. if manually change url simple this

/#/clients/some-client/claims/456 

it not change data. have make sure page hard refresh current data.

i getting event trace in console since have log_transitions set in app

transitioned 'clients.client.claims.claim.index' 

any idea on going wrong?

the router

nucleus.router.map(function () {   this.resource("clients", { path: 'clients' }, function () {     this.resource("client", { path: ':client_id' }, function () {       this.resource("claims", function () {         this.resource('claim', { path: '/:claim_id/:claim_sub' }, function () {           this.resource('lines', function () {             this.resource('line', { path: ':line_id' }, function () {               this.resource('flags', function () {                 this.resource('flag', { path: ':flag_id' });               });             });           });         });       });     });   });   this.route("errors", { path: '/errors/:error_id' }); }); 

my routes so

nucleus.clientsroute = nucleus.route.extend({   model: function (params) {     return nucleus.client.find('clients');   } });  nucleus.clientroute = nucleus.route.extend({   model: function (params) {     return nucleus.client.find('client', params);   } });      nucleus.claimsroute = nucleus.route.extend({       model: function (params) {         var client = this.modelfor('client'),             clientid = client.get('data.id');          params.client_id = clientid;         return nucleus.claim.find('claims', params);       },        gotonextclaim: function (claim) {         this.transitionto('claim', claim);       }     });      nucleus.claimroute = nucleus.route.extend({       model: function (params) {         var client = this.modelfor('client'),             clientid = client.get('data.id');          params.client_id = clientid;         return nucleus.claim.find('claim', params);       }     });  nucleus.applicationroute = ember.route.extend({    setupcontroller: function () {     this.controllerfor('meta_property').set('model', nucleus.metaproperty.find('meta_property'));     this.controllerfor('header').set('model', nucleus.user.find("user"));   }  }); 

and controllers so

nucleus.applicationcontroller = nucleus.controller.extend({   needs: ['meta_property'],    iserrorpage: false,    currentpathdidchange: function () {     if (this.get('currentpath') === 'errors') {       this.set('iserrorpage', true);     } else {       this.set('iserrorpage', false);     }   }.observes('currentpath')  });  nucleus.claimcontroller = nucleus.objectcontroller.extend({}); nucleus.clientcontroller = nucleus.objectcontroller.extend({}); 


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -