mirror of
https://github.com/discourse/discourse.git
synced 2025-02-27 09:04:26 +08:00

Per https://deprecations.emberjs.com/v3.x/#toc_routing-transition-methods We are upgrading all `this.replaceWith` calls on routes to directly call the router service (`this.router.replaceWith`)
12 lines
304 B
JavaScript
12 lines
304 B
JavaScript
import DiscourseRoute from "discourse/routes/discourse";
|
|
import { inject as service } from "@ember/service";
|
|
|
|
export default DiscourseRoute.extend({
|
|
router: service(),
|
|
|
|
beforeModel() {
|
|
const appModel = this.modelFor("wizard");
|
|
this.router.replaceWith("wizard.step", appModel.start);
|
|
},
|
|
});
|