S4E5 RouteReuseStrategy Explained

Опубликовано: 22 Октябрь 2024
на канале: Stepan Suvorov
5,661
74

Every time we navigate between components Angular destroys the previous component and creates the new one. In many situations, we might not want this, because every time we load a component we might run again expensive operations like HTTP requests. RouteReuseStrategy provider allows controlling the behavior of the Angular route and components lifecycle. In this episode, we will create our own ReuseStrategy Provider to store a list of items component.


Official docs: https://angular.io/api/router/RouteRe...

Code: https://github.com/stevermeister/Angu...

Angular Pro Screencasts Roadmap - https://github.com/stevermeister/Angu...

If you have any question or suggestion please put a comment, or ping me on Twitter -   / stevermeister