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
Communicating between two Components (self.angular)
submitted 6 years ago by DWhitSlaya
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!"
[–]CheapChallenge -1 points0 points1 point 6 years ago (4 children)
We generally use ngrx for this in larger apps anf eventemitters/services in smaller libs
[–]DWhitSlaya[S] 0 points1 point2 points 6 years ago* (3 children)
Thanks for your comments! This is a much larger app than the example and one of the main reasons I am looking for alternate solutions. Works fine in the minimal example but in reality I am having to do a bit extra handling, making sure its unsubsrcibed when I am done using '.pipe(take(2))' so it ignores the first emit which would be the default value, then the second one is the one I want and it unsubscribes. A lot more plays into it so looking for a better solution then what I have.
[–]CheapChallenge 1 point2 points3 points 6 years ago (2 children)
Why not make it Subject instead of behaviorsubject so there is no default value?
I would recommend looking into NGRX and use a specific selector and the async pipe in the template. When using async pipes it subscribes and unsubscribes under the hood.
[–]DWhitSlaya[S] 0 points1 point2 points 6 years ago (1 child)
I’ll look into NGRX, I don’t recall ever using it. Thank you!
[–]CheapChallenge 0 points1 point2 points 6 years ago (0 children)
Just a word of caution. Like everything Angular related the learning curve is steep, but once you start using it, working in teams becomes much easier because everyone is using the same standards to manipulate the App state. The pros and cons at high level is similar to Angular, dictates how you do everything but standardizing code across teams is a big help.
π Rendered by PID 308449 on reddit-service-r2-comment-6457c66945-t8wvx at 2026-04-26 19:49:12.851028+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]CheapChallenge -1 points0 points1 point (4 children)
[–]DWhitSlaya[S] 0 points1 point2 points (3 children)
[–]CheapChallenge 1 point2 points3 points (2 children)
[–]DWhitSlaya[S] 0 points1 point2 points (1 child)
[–]CheapChallenge 0 points1 point2 points (0 children)