mgechev / dynamic-route-creator

[DEPRECATED] Demo for dynamically defining routes in Angular 2
MIT License
19 stars 16 forks source link

Request: Is it possible to add lazy loading to this? #3

Open ashkank83 opened 8 years ago

ashkank83 commented 8 years ago

I'm trying to use this method for authorization, so basically when user logs in my login service will return an array of accessible items and based on that I create the navigation (App-NAV in your example). However I'm not sure how to merge the lazy loading as well into this. If Lazy loading is merged then it means that the user with no access to certain components/routes won't even get those loaded on the client. I believe this will result in a better security as well (please correct me if I'm wrong)

Would you kindly show me how to add the lazy loading into this (is it possible?)

Thanks