Skip to content

Loading…

Add `transitionTo` shorthand to events hash. #10

Closed
machty opened this Issue · 1 comment

1 participant

@machty

Inspired by emberjs/ember.js#2371, I'd like to support the following:

App.IndexRoute = Ember.Route.extend({
  events: {
    didSave: "post.show"
  }
});

The string value would be shorthand to initiate a transitionTo 'post.show'. The above PR is solid, but I'd much prefer writing it this way, and I think it's pretty clear at first glance what it does.

@machty

Given the direction of emberjs/ember.js#2522 to funnel attempted transitions through a transitionTo event, this PR makes less sense. router.js shouldn't know anything about a 'transitionTo' event, and a PR for the proposal above would require such knowledge. Stef's linked PR above makes more sense and can be handled entirely in Ember.

@machty machty closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.