Comments (2)
This is default behawior of shareReplay
operator.
Documentation mention:
By default shareReplay will use refCount of false, meaning that it will not unsubscribe the source when the reference counter drops to zero, i.e. the inner ReplaySubject will not be unsubscribed (and potentially run for ever). This is the default as it is expected that shareReplay is often used to keep around expensive to setup observables which we want to keep running instead of having to do the expensive setup again.
Using shareReplay({ refCount: true, bufferSize: 1 })
solves the issue
https://stackblitz.com/edit/angular-16-starter-5wonlb?file=src%2Fsub.component.ts
from angular.
Thanks!
I did not know that!
from angular.
Related Issues (20)
- Angular QuickStart Application will not run when upgrading to v17 HOT 2
- routerLinkActiveOptions fragment add option to not match when no fragment is used HOT 3
- routerLinkActive doesn´t set the active class correctly HOT 4
- transferState HOT 1
- Add ability to update secondary signal when input signal changes HOT 3
- Report Error when checking if two unboxed signals are > or < each other? HOT 1
- Add Documentation how to programmatically set Input Signals HOT 3
- Add global configuration for the default change detection and styles encapsulation settings
- Showcasing a counter as a signal example in playground HOT 3
- routerLinkActiveOptions fragment add option to not match when no fragment is used
- Try out Inject page not found HOT 2
- docs(rxjs-interop): toSignal injection context HOT 2
- [Security Vulnaraibility] Any Patch for `webpack-dev-middleware` about Path Traversal ? HOT 2
- After upgrading to v17 unable to see imported components HOT 2
- Publishing an SSR app w/ Angular 17 on a cPanel is possible, right? HOT 3
- Number inputs with a dynamic type always return strings HOT 2
- Feature Request: Introduce Concise Syntax for Defining Template Variables in Angular Templates HOT 5
- i can see the web of animation api's of angular. HOT 2
- Wrong url in app creation HOT 2
- NG0952: Input is required but no value is available yet. HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular.