You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
API does not expose router property (public or private), I can use named inject like routing: inject('router'), but it seems to me, that this should work out of box?
The intent is to use ember-cli-meta-tags and urlFor() to generate URL for rel meta tags and the router:main does not have this method available.
Thanks
The text was updated successfully, but these errors were encountered:
This is because router is already a private property of the Route class.
Hm, not sure what specifically is going on here… Can you provide an ember-twiddle.com reproduction?
I see that router is used in route's codebase, but I'm not sure if the injection should work (as other service injections) or router should be marked as private in API and maybe throw error when someone tries to inject router service into route using router: inject()?
Here is a basic Twiddle, see console with logged error, router is not a router service instance.
FWIW, since Route#router is private API, this seems a bug to me. That private API should be _router or something even more private that doesn't preclude users to inject the router service with the very reasonable name of "router".
Hi,
when I inject RouterService into some route, this property is replaced by
router:main
.API does not expose
router
property (public or private), I can use named inject likerouting: inject('router')
, but it seems to me, that this should work out of box?The intent is to use
ember-cli-meta-tags
and urlFor() to generate URL forrel
meta tags and therouter:main
does not have this method available.Thanks
The text was updated successfully, but these errors were encountered: