mirror of
https://github.com/discourse/discourse.git
synced 2025-02-21 18:29:39 +08:00

Per https://deprecations.emberjs.com/v3.x/#toc_routing-transition-methods We are upgrading all `this.transitionToRoute` calls on controllers to directly call the router service (`this.router.transitionTo`)
18 lines
389 B
JavaScript
18 lines
389 B
JavaScript
import Controller from "@ember/controller";
|
|
import { action } from "@ember/object";
|
|
import { inject as service } from "@ember/service";
|
|
|
|
export default class AdminCustomizeFormTemplatesIndex extends Controller {
|
|
@service router;
|
|
|
|
@action
|
|
newTemplate() {
|
|
this.router.transitionTo("adminCustomizeFormTemplates.new");
|
|
}
|
|
|
|
@action
|
|
reload() {
|
|
this.send("reloadModel");
|
|
}
|
|
}
|