javascript - Uncaught TypeError: Cannot read property 'enter' of undefined , while using transitionToRoute -


i getting "uncaught typeerror: cannot read property 'enter' of undefined". when using transitiontoroute in controller. transitiontoroute function in controller,

     transitiontoroute: function() {          // target may either controller or router          var target = get(this, 'target');          var method = target.transitiontoroute || target.transitionto;          return method.apply(target, arguments);      }, 

here target variable being assigned view instead of controller or router. don't know if issue or using transitiontoroute in wrong way. need here.

edit: above function can found here, https://github.com/emberjs/ember.js/tree/v2.0.1/packages/ember-routing/lib/ext/controller.js#l41

edit: in above function, calls function controller object "this", looking "target" key in it. when log "this.target" in transitiontoroute prints route class, if log same variable in function view class.

i have no clue how happening.

try

transitiontoroute: function() {      // target may either controller or router      var target = get(this, 'target');      var method = target.transitiontoroute || **this.target.transitionto;**      return method.apply(target, arguments);  }, 

Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -