Closed maxneuvians closed 4 years ago
Recommend doing something like this:
.addGlobal('getRoute', (name) => app.routes.get(name))
<a href="{{getRoute("logout").path[locale]}}">{{ __("Logout") }}</a>
Looks like routePath("logout")
already exists :tada:
Currently there seems to be no way to get a url for a known route in a view. The current route is accessible through
{{ route }}
but you are unable to get the route for anything else, ex.{{ route.get("logout").url }}
is not a thing.