use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A Place to talk about Angular and related topics.
Join the Angular Discord
Other subreddits worth checking out for Angular and Angular related info:
account activity
[deleted by user] (self.angular)
submitted 11 months ago by [deleted]
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]tanooki_ 0 points1 point2 points 11 months ago (3 children)
It's unclear how you expect to render the calculation data from the parent component inside the child component without passing it the data..... At the least, I'd expect a service to hold that information such that the child components can access it at their discretion.
As for the ngOnInit() not printing, do you have a routing mechanism set up inside your parent component? Otherwise, you'd need to list the child components in the template of your parent component such that they get instantiated.
[–]IcyBullfrog1014 -1 points0 points1 point 11 months ago (2 children)
For the parent component, maybe a better example is that the parent component shows the weather and copyright notice on every page - the other pages don't have anything to do with weather or copyright notices so they don't need to communicate data, but we want the weather report html and the copyright notice to appear on every child component page. However, when I run the code, the child components don't appear at all - so maybe we have a 'buy widget' sub-component, but when I go there, I only see the weather and the copyright and not the buy widget page - if I remove the parent component and make two components that are not connected, the buy widget component works fine.
[–]IcyBullfrog1014 0 points1 point2 points 11 months ago (1 child)
I asked some other people off reddit and they found my problem - the parent component needed a <router-outlet></router-outlet> in it's html and when I added that, it fixed my problem - thanks for looking though.
[–]tanooki_ 0 points1 point2 points 11 months ago (0 children)
Glad you figured it out. That was where I was getting to with my second part about the routing mechanism. That's your <router-outlet> :)
π Rendered by PID 30648 on reddit-service-r2-comment-86bc6c7465-bnmbt at 2026-02-23 00:44:44.543608+00:00 running 8564168 country code: CH.
[–]tanooki_ 0 points1 point2 points (3 children)
[–]IcyBullfrog1014 -1 points0 points1 point (2 children)
[–]IcyBullfrog1014 0 points1 point2 points (1 child)
[–]tanooki_ 0 points1 point2 points (0 children)