-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Improve async pipe for sing 8000 le object observables #12237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
AFAIK @robwormald was thinking about it, good to have an issue tracking this. Thnx for opening. |
there's a shortcut - |
Duplicate of #2451 |
@DzmitryShylovich I don't think it is direct duplicate. #2451 could be a solution for the issue at hand but:
As such I'm going to keep both issues opened. But it is good to have them linked, thnx! |
It will be very useful feature!!!
or
|
@Martin-Wegner it's now possible with the new syntax #15020 |
@DzmitryShylovich thanks for informing me, sounds very good :) |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
I'm submitting a ...
Current behavior
Main motivation: print multiple object properties by using the async pipe with 1 network request
For array observables
myObjects$: MyObject[]
you can use the async pipe in the following way:The code above will end in 1 network request.
For single object observables
myObjects$: MyObject
you can use the async pipe in the following way:The code above will end in 3 network requests :(
For sure you could cache the observable
.publishReplay(1).refCount()
(only 1 network request) but all together it looks odd.Expected behavior
Add support for a local template variable e.g.:
What is the motivation / use case for changing the behavior?
Beautiful code for printing multiple object properties by using the async pipe with 1 network request.
Please tell us about your environment:
Linux
The text was updated successfully, but these errors were encountered: