routing - Angular 2 configure routes dynamically -


i new angular 2. building application, menu needs rendered dynamically based on user's role. roles, menu items should hidden.

the user's details (name, role) need fetched upon startup (bootstrap) web service.

this presents problem. routes need specified in appmodule, whereas fetching of user's details done inside appcomponent, post routes can decided. how can setup routes dynamically post web service call?

thanks in advance.


Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

android - IllegalStateException: Cannot call this method while RecyclerView is computing a layout or scrolling -