Is there any way to load module conditionally or prevent module access in some conditions? I just want to load modules and its subroutes only a specific condition satisfied.
The possible solution I tried till now
- Lazy load modules with routing details.
- canActivate with auth mechanism service.
Is there any effective way to achieve the same so that.
- Common features should not be duplicated.
- Module with routing details should be only loaded when in need.
Any help in this regard appreciated TIA.