Can I use routeAction in glimmer single-file components?

From my test, the following works.

import { get } from "@ember/object";
import { routeAction } from 'discourse/helpers/route-action';

{{on "click" (routeAction "showLogin" (get this "router._router"))}}

It assumes you have the router service defined in the component.

I’m unsure whether it’s considered bad practice. It doesn’t sound like a good idea, but it works. :smile: