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
Post a Comment