Reputation: 1107
I have an Angular resolver which is fetching data from an external system through a http call. Based on some condition I don't want the resolver to proceed and loading the component in the route. How can we manage this in Angular without using CanActivate. The reason is that I want to fetch this data only once for performance reasons.
Upvotes: 0
Views: 61
Reputation: 2119
Use LocalStorage or SessionStorage or SharedService, set a flag to decide whether to route to the component or not.
Upvotes: 1