TwanoO67 / ngx-admin-lte

Admin LTE for Angular 2/4/6/8 as a NPM package
MIT License
108 stars 47 forks source link

Removing/Controlling buttons in user dropdown (Followers, Sales, Friends) #68

Open dakipro opened 6 years ago

dakipro commented 6 years ago

Hi, how to control or remove buttons in a user dropdown? Or subscribe to current buttons actions? Thankss

TwanoO67 commented 6 years ago

Hello,

You can disactivate some part of the header by passing boolean to them, see here: https://github.com/TwanoO67/ngx-admin-lte/blob/develop/src/widgets/app-header/app-header.component.ts

and here an example on how you can disable them: https://github.com/TwanoO67/bootstraping-ngx-admin-lte/blob/develop/src/app/app.routes.ts#L31

you can also provide new component if you like

dakipro commented 6 years ago

thanks, I found those options for disabling them.

But basically, user dropdown component cannot (as of todaz) be used in real applications, as buttons cannot be mapped/changed/removed? The user/profile component provided is more of a concept of how it should be implemented, correct? Or can I bind "logout" to do some action I want it to?

fabioformosa commented 6 years ago

@dakipro this topic has been treating here #57 In the meanwhile, I suggest you the workaround described there.

However, I agree with you: this project has to grow to be used in real applications. The service-based approach is OK to control some minor styles by flags, but it's rather wrong to override/customize it.