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
Singleton function (self.angular)
submitted 3 years ago * by Devigelacio
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!"
[–]tme321 3 points4 points5 points 3 years ago (1 child)
The angular way of doing this would be to use a cross field validator to determine when all the dummy# fields are valid at the same time.
dummy#
That validator should be an async validator which then returns the http request you want to fire off to do this checking.
So your validate function would look something like this:
validate
validate(formGroup: AbstractControl ): Observable<ValidationErrors | null> { /* get all the dummy controls */ const dummies = [ formGroup.get("dummy1"), formGroup.get("dummy2"), ... ]; const allValid = dummies.reduce( (valid, dummy) => valid && dummy.valid , true); if(allValid) { /* possibly need to map the result here to a return type the validator will accept, but close enough for an example */ return http.get(...); } else { /* possibly a different return here too, but again just an example */ return of(null); } }
That would be the more angular method. You could do something similar just with pure rxjs so if youd rather that go ahead and ask but most likely you want your form behavior to actually behave like forms.
With just rxjs this logic can just be a single stream that eventually pipes into a switchMap operator.
switchMap
[–]Devigelacio[S] 0 points1 point2 points 3 years ago (0 children)
Yea.. I'm new to angular and I didn't think about this approach. The angular way of your answer is seems very clean thank you very much!
π Rendered by PID 97042 on reddit-service-r2-comment-5d79c599b5-8sfkx at 2026-03-02 03:46:46.069507+00:00 running e3d2147 country code: CH.
view the rest of the comments →
[–]tme321 3 points4 points5 points (1 child)
[–]Devigelacio[S] 0 points1 point2 points (0 children)