Open
Description
I have used ngx-permissions in several apps but have recently started to use Angular 19 in pure standalone mode.
It wasn't clear where "NgxPermissionsModule.forRoot()" should go in this setup.
To help others it would be useful if the following sample could be added to the docs/wiki - it is sort of obvious once you know but it had me puzzled for some time!
Update app.config.ts
import {
ApplicationConfig,
importProvidersFrom,
provideZoneChangeDetection,
} from '@angular/core';
import { NgxPermissionsModule } from 'ngx-permissions';
export const appConfig: ApplicationConfig = {
providers: [
provideZoneChangeDetection({ eventCoalescing: true }),
provideHttpClient(),
provideRouter(routes),
provideAnimationsAsync(),
importProvidersFrom(NgxPermissionsModule.forRoot()),
],
};
Metadata
Metadata
Assignees
Labels
No labels