ember.js - Ember tranistionToRoute error -



ember.js - Ember tranistionToRoute error -

from controller action "submit" getting error:

rangeerror: maximum phone call stack size exceeded @ string.indexof (native) @ (http://builds.emberjs.com/canary/ember.prod.js:16123:41) @ controllermixin.reopen.transitiontoroute (http://builds.emberjs.com/canary/ember.prod.js:19948:22) @ controllermixin.reopen.transitiontoroute (http://builds.emberjs.com/canary/ember.prod.js:19950:23)

here offending code:

actions: { submit: function() { var self = this; this.get('model').save().then(function() { self.transitiontoroute('animals'); }); } }

now, #/animals works when typed in url. , have tried variations:

self.transitiontoroute('animals.index'); , self.transitiontoroute('/animals');

and none of them work. problem?

well, turns out. setting controllername in route other default controller left controller without target of apps router. code transitiontorouter calls controllers target, expects apps router. in case controller target points itself. next tried mixin , got error: uncaught typeerror: cannot read property 'foreach' of null

which looks related this:

http://discuss.emberjs.com/t/dynamically-extending-object-instances-with-mixin/5411/5

basically can't utilize mixin cause has properties have meta data. guess stuck copying , pasting.

ember.js

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -