• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • Carey Brown
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • fred rosenberger
  • salvin francis

parent or child or sibling?

 
Bartender
Posts: 1810
28
jQuery Netbeans IDE Eclipse IDE Firefox Browser MySQL Database Chrome Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm studying data sharing and binding and every article refers to parent and child components or sibling components, but I can't find anything that explains this relationship. How do I know if a component is a parent or a child and to whom? Or determine two siblings?

One article made a brief mention of showing the nesting in the app.component.html file, but not all components are listed in this file so that's no help.

Specifically I have a bootstrap modal component that is standalone. It updates information that must be displayed on a landing page.
 
Rancher
Posts: 535
6
IntelliJ IDE Spring Fedora
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
well the component is an individual section that can be used in another component.  So like if you have a main page that has a header and footer and navigation bar, then all the different section that you would show are a child to the main page(parent).  The sections that are shown on the main page(parent) are siblings to each other.  

An easy way to look at that is routing.  if the parent is /main, then the children are like /main/children.  

Not sure if that's what you're talking about.

If it's just a modal then you can just put it on the landing page.  
 
J. Kevin Robbins
Bartender
Posts: 1810
28
jQuery Netbeans IDE Eclipse IDE Firefox Browser MySQL Database Chrome Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That does help a bit, yes. I am working with a modal which doesn't use routing. A click on a navbar menu runs the open() method of the modal and then the submit or cancel buttons close it so there is no routerLink. But it sounds like the modal is a child of the navbar and a grandchild of the main page.

I finally sorted out the Observer/Subscriber problem I was having but this clears things up a bit for future challenges.

Thanks
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic