-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
So, let's say this setup:
- We have a component that represents a page/screen
- The component is injected into two different hosts (let's say app and engine).
- The component will link to a particular page
- The component knows about that target route and what kind of parameters to pass in
- Yet the component doesn't know under which name the route is available in the current host
As routes are the connectivity layer - they have knowledge about route names but at route level the information about what parameters to be put in are not directly present.
FWIW is to curry links. Ie. the route passes in the link/name of the route and the component curries it with the parameters. I assume something like this code:
{{! route.hbs }}
<MyPage @detailLink={{link 'go-to-details'}} />{{! component }}
<Button @link={{link @detailLink this.model.id}}>...</Button>Now, this example looks like as if it is enough to pass in the route name, but also on route level you shall be able to pass generic parameters in as well, so within the component it is only to "finalize" the link.
thoughts?
Metadata
Metadata
Assignees
Labels
No labels