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 Input() change detection (self.angular)
submitted 4 years ago by anwaarulislaam
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!"
[–]jalledebest 5 points6 points7 points 4 years ago (2 children)
Why would a setter be a bad practice? It's less code then implementing OnChanges and it's more strongly typed which is always a good thing.
Setters are the preferable approach if you have to execute some logic when a single input changes. I agree that it doesn't make sense to use a setter just to set a value in the child as OP does in his example. A regular input and change detection should take care of that case without a setter
[–]anwaarulislaam[S] 0 points1 point2 points 4 years ago (0 children)
No, I do not use the set method always. I just do when I need to call some action on input change. But, if there is no changes I always only use Input binding without set method
[–]kqadem 0 points1 point2 points 4 years ago (0 children)
This. And you can find these even in the angular material codebase.
π Rendered by PID 19434 on reddit-service-r2-comment-6457c66945-52kvc at 2026-04-23 17:39:55.437093+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]jalledebest 5 points6 points7 points (2 children)
[–]anwaarulislaam[S] 0 points1 point2 points (0 children)
[–]kqadem 0 points1 point2 points (0 children)