Add `transitionTo` shorthand to events hash. #10

Closed
machty opened this Issue Mar 30, 2013 · 1 comment

Comments

Projects
None yet
1 participant
@machty
Contributor

machty commented Mar 30, 2013

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

This comment has been minimized.

Show comment
Hide comment
@machty

machty Apr 22, 2013

Contributor

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.

Contributor

machty commented Apr 22, 2013

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 Apr 22, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment