Skip to content

Instantly share code, notes, and snippets.

@knownasilya
Last active August 29, 2015 14:24
Show Gist options
  • Save knownasilya/af36b9ae1e5754ce657f to your computer and use it in GitHub Desktop.
Save knownasilya/af36b9ae1e5754ce657f to your computer and use it in GitHub Desktop.
ember router first transition
var Router = Ember.Router.extend({
location: config.locationType,
init: function () {
this._super.apply(this, arguments);
// Listen for the first transition, and trigger the `setupMapOnFirstLoad` action when it's complete.
this.one('willTransition', function (transition) {
transition.then(function () {
transition.send(false, 'setupMapOnFirstLoad');
});
});
}
});
export default Router.map(function () {
//...
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment