-
-
Notifications
You must be signed in to change notification settings - Fork 150
Hide a item in navItems #60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
hi @pnthree _nav.ts returns a configuration object to populate sidebar-nav
{
name: 'Colors',
url: '/theme/colors',
icon: 'icon-drop',
attributes: { hidden: true }
},
see also: |
Thank you for prompt response and assistance , it works
Regards
Prince
…On Sat, May 4, 2019 at 2:50 PM xidedix ***@***.***> wrote:
hi @pnthree <https://github.com/pnthree>
_nav.ts returns a configuration object to populate sidebar-nav
- static way: in _nav.ts add hidden attribute to item:
{
name: 'Colors',
url: '/theme/colors',
icon: 'icon-drop',
attributes: { hidden: true }
},
- dynamic way: write an agular service to set up nav config object
dynamically, and subscribe the result in default-layout.component
see also:
- coreui/coreui-free-angular-admin-template#126
<coreui/coreui-free-angular-admin-template#126>
- coreui/coreui-free-angular-admin-template#123
<coreui/coreui-free-angular-admin-template#123>
- coreui/coreui-free-angular-admin-template#143
<coreui/coreui-free-angular-admin-template#143>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#60 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAEUUMN2IMC3G44F2DDXZU3PTWBB3ANCNFSM4HKV7Q4A>
.
|
I created a service called authentication in the services folder located at the root of the project. In this service I created a hasRole method which allows you to see if the user has a role and return true. As you can see: public hasRole(roles: string[]): boolean {
}. Now I want to display this sidebar element only if the user has the "ADMIN" or "PATIENT" role. { |
How Can i hide a item in array navItems?
The text was updated successfully, but these errors were encountered: