• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

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.
 
Bartender
Posts: 669
15
TypeScript 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
 
Paddy spent all of his days in the O'Furniture back yard with this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic