Accessing actionUrl in Vue component?


Run into an issue while building an addon. I'm running Statamic from a subdirectory so I can't rely on using the root URL for Controller routes.

Documentation also states that the actionUrl /!/ is modifiable, so use of the actionUrl() helper is encouraged.

On the Vue side, I can see the global helpers for cp_url and resource_url - I'm wondering if there's an equivalent for actionUrl? Seems like a common pattern.

New to Vue so I'm unsure of the best practices to pass that URL through to the component from a Fieldtype. I guess I could add it to the data during preProcess, but that seems hacky.

Any advice welcome.

Answered by Erin Dalzell!
>>>>>>> Answered <<<<<<<
1 Reply