# Kann ich routeAction in Glimmer Single-File-Komponenten verwenden?

**URL:** <https://meta.discourse.org/t/can-i-use-routeaction-in-glimmer-single-file-components/288936>\
**Category:** Development\
**Created:** [16. Dezember 2023 um 22:03 UTC](https://meta.discourse.org/t/can-i-use-routeaction-in-glimmer-single-file-components/288936 "2023-12-16T22:03:38Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)\
**Post date:** [17. Dezember 2023 um 04:08 UTC](https://meta.discourse.org/t/can-i-use-routeaction-in-glimmer-single-file-components/288936/2 "2023-12-17T04:08:47Z")

</div>

In einer Glimmer-Komponente brauchen Sie den Helfer meiner Meinung nach nicht. Sie können dies direkt tun:

```js
{{on "click" this.showLogin}}

```

Wenn Sie Argumente übergeben müssen:

```js
{{on "click" (fn this.showLogin <argument>)}}

```

Es wird nach der Aktion suchen:

```plaintext
@action
showLogin(<argument>, event) {}

```

---

_[View the full topic](https://meta.discourse.org/t/can-i-use-routeaction-in-glimmer-single-file-components/288936)._
