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
Which @angular/* package(s) are relevant/related to the feature request?
core, router
Description
Can child components of the parent that has the param also access the e.g. params :id
Right now, I have to pass all the inputs from the parent (which is the container), into the child's via the component [input] parameter.
Would be great if the childs could also access the input bindings of the parent.
Not sure how the Angular team views this, maybe something they have already thought about?
Proposed solution
Propose input bindings to be directly accessible by child components (not those loaded via router outlet, but actual components put into the view template of the parent)
Alternatives considered
Currently having to manually pass through the parent down to the child.
The parent (in my case a container), has no real interest in the params, it is the child that does.
The text was updated successfully, but these errors were encountered:
dreamstar-enterprises
changed the title
Component Input Binding - can child of the parent that has the param also access the e.g. params
Component Input Binding - can child of the parent access the params of the parent, via component input binding syntax?
May 17, 2024
I just tried this, and it doesn't work when the child is just a component of the parent's view template
e.g.
<parent>
<router outlet></router outlet> - works I suppose with the paramsInheritanceStrategy
<child></parent> - doesn't seem to be accessible here
</parent>
Which @angular/* package(s) are relevant/related to the feature request?
core, router
Description
Can child components of the parent that has the param also access the e.g. params :id
Right now, I have to pass all the inputs from the parent (which is the container), into the child's via the component [input] parameter.
Would be great if the childs could also access the input bindings of the parent.
Not sure how the Angular team views this, maybe something they have already thought about?
Proposed solution
Propose input bindings to be directly accessible by child components (not those loaded via router outlet, but actual components put into the view template of the parent)
Alternatives considered
Currently having to manually pass through the parent down to the child.
The parent (in my case a container), has no real interest in the params, it is the child that does.
The text was updated successfully, but these errors were encountered: