Last active
August 29, 2015 14:24
-
-
Save knownasilya/af36b9ae1e5754ce657f to your computer and use it in GitHub Desktop.
ember router first transition
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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