Footer content according to loaded component


#1

hi,

what can i use to have only one footer component with dynamic content according to the current component loaded ?

thanks in advance


#2

That sounds like a spaghetti design to me, because it is going to couple the app component too tightly to the other pages. I think it would be easier to read, test, and maintain if you decentralized the footer and had each page provide their version of it.


#3

if i understand well u advice me to use different footer component by page ?

But i use different footer component not by page but by (content) loaded component on the same page.

spaghetti design why ?


#4

Because it blurs the lines of control. It becomes unclear who is in charge of determining what. If components are attempting to interact with their parent containers, they aren’t truly independent.


#5

If components are attempting to interact with their parent containers, they aren’t truly independent

When a component is loaded into another component (parent container), there is not interaction between the parent and the child component. even more if i use a provider.

You talk about things that are not related to my comment, or maybe explain more precisely.

Another hand, in this forum, are they used to not answer to the question completely? (except my first)
I can understand that my questions are not complicated so it’s not a reason … dude ! give me an answer when i ask a confirmation about your comment. it will be constructive.

Don"t see an offensive, but be honest and agree with community spirit.


#6

In that case I’d say it’s a little unclear what you’re asking, so could you explain what you’re trying to do a little bit more?


#7

-My page have 3 parts (header, content, footer)
-My page load several content component.
-Each content component require to have different footer content value (like a text or an image or nothing).
-these footer contents take the same place in design

I want to factorize these footer components to only one footer component that should take dynamic content value.
But i don"t know what is the best way to achieve that.

==> what can i use to have only one footer component with dynamic content according to the current “content” component loaded ?


#8

If you’re a doctor, and a patient comes to you asking how to cut their arm off, would you just give them a saw or would you try to figure out how to help them without causing them irreparable harm?

I think you are asking here effectively “what is the best way to make a maintenance nightmare?”.