There are 3 components in my project: 1 parent and 2 child components with router outlet. The child component becomes active whenever its route is called, sharing data using a service.
Both of these child components have complex views.
When switching between these two routes, it takes a long time to render the view (I have used some bootstrap UI, ngbootstrap, and other libraries).
The data remains unchanged between these two child components, only the view part changes which slows down the process.
Is there a way to cache these components once they are called to improve performance? Any suggestions would be greatly appreciated. Thank you.