AlexKhymenko / ngx-permissions

Permission and roles based access control for your angular(angular 2,4,5,6,7,9+) applications(AOT, lazy modules compatible
MIT License
936 stars 126 forks source link

Wierd issue that has no error withg angular 18.... #238

Closed RichardBoyder closed 1 month ago

RichardBoyder commented 1 month ago

I'm submitting a...


[ x] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Feature request
[ ] Documentation issue or request

Current behavior

Hi there

Seems i load the permissions and when i do this.permissionService.getPermissions()

i see them loaded: { "User": { "name": "User" }, "TeamLead": { "name": "TeamLead" } }

But when i try: <div *ngxPermissionsOnly="['User']">for users</div>

it doesnt work.. the div is still hidden...

Please help? how am i supposed to access User

Expected behavior

Should be able to show the div with <div *ngxPermissionsOnly="['User']">for users</div>

Minimal reproduction of the problem with instructions

Environment


Angular version: 18
ngx-permissions version: 17.1.0


Browser:
- [ ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [x] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [x ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX            
RichardBoyder commented 1 month ago

forgot to import to standalonen component NgxPermissionsModule

sorted