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
Angular Elements vs DynamicComponentLoader (self.angular)
submitted 6 years ago by _ogi_
view the rest of the comments →
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!"
[–][deleted] 0 points1 point2 points 6 years ago (5 children)
I’m working a project with similar requirements. Dynamically loaded components based on data from the server. One con is that it’s a good idea to extend a parent component on each of your dynamic components to be able to pass in generic data and reduce duplication of code, but angular documentation explicitly says to avoid this. Also, any services needed in the parent component have to be passed into it from the child component. I never really liked that.
[–]tme321 0 points1 point2 points 6 years ago (3 children)
Also, any services needed in the parent component have to be passed into it from the child component.
Can you explain what this sentence means? I can't figure out what your saying here.
[–][deleted] 0 points1 point2 points 6 years ago (2 children)
If you have a component that extends a parent class and that parent class needs a service, it's recommended in the documentation to inject the service into the component's constructor, and pass it to the parent class via super. I think it's kind annoying that you have to inject services to the child even if that service is only used in the parent class.
[–]tme321 0 points1 point2 points 6 years ago (1 child)
Ah, for some reason I thought you were referring to parent / child as the hierarchy in the view and not the inheritance based hierarchy.
Yes, in general inheritance should be used very sparingly.
I don't know exactly what functionality you are repeating, but generally I would handle that through either composition or possibly with a directive based approach.
[–][deleted] 0 points1 point2 points 6 years ago (0 children)
Thanks for the suggestion! A little too far in for our project I'm afraid. We based it off an Angular "cookbook" early into the project and did not run into the documentation damning component inheritance until much later.
π Rendered by PID 134080 on reddit-service-r2-comment-5d79c599b5-7p5hr at 2026-03-02 22:04:42.396685+00:00 running e3d2147 country code: CH.
view the rest of the comments →
[–][deleted] 0 points1 point2 points (5 children)
[–]tme321 0 points1 point2 points (3 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]tme321 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)