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
Post a Comment