-
Notifications
You must be signed in to change notification settings - Fork 129
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
ngx-permissions & material design issue #110
Comments
@NobodyIs001 can i have reproduction :-) Cause i don't have time right now :-) |
@AlexKhymenko yes, of course. Here is very simple demo: https://stackblitz.com/edit/angular-ngxpermission-material-issue?file=src%2Fapp%2Fapp.component.ts Maybe I'm doing something wrong... |
@NobodyIs001 actually this is hard one. So i have tried to do it normal way but it seems impossible Maybe there is clever way of casting elementRef to the component but i actually don't know about this one.
and then use it. Here is plunker of working https://stackblitz.com/edit/angular-ngxpermission-material-issue-moounv?file=src/app/app.component.ts |
Maybe somebody can help :-) |
Hi Alex, thanks for info and feedback. Have a nice day :-). |
I'm closing the issue, because your idea based on ng-template is quite comfortable for me ;). Thanks once again. I comes from ASP.NET world as an Angular newbie so I did not know that it can be solved by this way :) |
bit off topic but i was playing with the stackblitz example and i notice one strange thing, while using ngx-permission on mat-tab, ngx-permission causes a little fade in animation, the content of tabs animates in from the right. With out ngx-permission its doesn't cause animation. here is the link: |
Same issue here, i use material icons in material stepper and icons cannot be rendered in a ng-template using ngxPermissions |
Hi Alex,
I'm using Angular 7 and ngx-permissions v 6.0.6 and it looks like the strategies are not working if the material design is used. A brief example:
In this example
ADMIN-enabled (1)
is always enabled no matter if an user is ADMIN or not. Second oneADMIN-enabled (2)
has correct behaviour (disabled if the user is not ADMIN).ngxDisableElement is identical with your example:
this.ngxpcs.addPermissionStrategy('ngxDisableElement', (tF: TemplateRef) => { this.renderer2.setAttribute(tF.elementRef.nativeElement.nextSibling, 'disabled', 'true'); });
The text was updated successfully, but these errors were encountered: