You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am getting an "Uncaught TypeError: Cannot read property 'enter' of undefined". This is when i am using transitionToRoute in a controller.
The transitionToRoute function in controller,
transitionToRoute: function() {
// target may be either another controller or a router
var target = get(this, 'target');
var method = target.transitionToRoute || target.transitionTo;
return method.apply(target, arguments);
},
here the target variable is being assigned a view instead of controller or router. I don't know if this is a issue or am i using transitionToRoute in a wrong way. Need help here.
EDIT: In the above function, it calls get function with a controller object as "this", looking for "target" key in it. When i log "this.target" in transitionToRoute it prints a route class, but if i log the same variable in get function i get a view class.
I have no clue how this is happening.
The text was updated successfully, but these errors were encountered:
I am sorry to raise a issue, but it was a plugin which i was using causing the issue. Plugin was modifying the target key of controller and resetting it back.
I am getting an "Uncaught TypeError: Cannot read property 'enter' of undefined". This is when i am using transitionToRoute in a controller.
The transitionToRoute function in controller,
transitionToRoute: function() {
// target may be either another controller or a router
var target = get(this, 'target');
var method = target.transitionToRoute || target.transitionTo;
return method.apply(target, arguments);
},
here the target variable is being assigned a view instead of controller or router. I don't know if this is a issue or am i using transitionToRoute in a wrong way. Need help here.
EDIT: The above function can be found here, https://github.com/emberjs/ember.js/tree/v2.0.1/packages/ember-routing/lib/ext/controller.js#L41
EDIT: In the above function, it calls get function with a controller object as "this", looking for "target" key in it. When i log "this.target" in transitionToRoute it prints a route class, but if i log the same variable in get function i get a view class.
I have no clue how this is happening.
The text was updated successfully, but these errors were encountered: