Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Navigation menu, routing based on feature #8223


User avatar
0
ajayak created

Hi,

Is there any way to authorize angular routes as we do for permissions?

For eg:

new AppMenuItem('OrganizationUnits', 'Pages.Administration.OrganizationUnits', 'flaticon-map', '/app/admin/organization-units'),

and

{ path: 'users', component: UsersComponent, data: { permission: 'Pages.Administration.Users' } },

Can I do this check based on edition feature?


2 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @,

    Yes, you can set featureDependency property of a AppMenuItem to a function which returns true/false.

  • User Avatar
    0
    ajayak created

    That worked fine. I also added data['feature'] check in route guard.