How to use the ngx-permissions.NgxPermissionsModule.forRoot function in ngx-permissions

To help you get started, we’ve selected a few ngx-permissions examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Infosys / enterprise-angular-seed / src / app / app.module.ts View on Github external
import { ROUTES } from './app.routes';
import { PageNotFoundComponent } from './components/page-not-found/page-not-found.component';
import { HeaderComponent } from './components/header/header.component';
import { FooterComponent } from './components/footer/footer.component';

const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = {
  suppressScrollX: true
};

@NgModule({
  declarations: [AppComponent, HeaderComponent, FooterComponent, PageNotFoundComponent],
  imports: [
    BrowserModule,
    BrowserAnimationsModule,
    RouterModule.forRoot(ROUTES, { enableTracing: false }),
    NgxPermissionsModule.forRoot(),
    MenubarModule,
    PerfectScrollbarModule,
    // Bootstrap4FrameworkModule,
    // JsonSchemaFormModule.forRoot(Bootstrap4FrameworkModule),
    AppcommonModule
  ],
  providers: [
    {
      provide: PERFECT_SCROLLBAR_CONFIG,
      useValue: DEFAULT_PERFECT_SCROLLBAR_CONFIG
    }
  ],
  bootstrap: [AppComponent]
})
export class AppModule {}
github notadd / ng-notadd / src / app / app.module.ts View on Github external
@NgModule({
    declarations: [
        AppComponent
    ],
    imports: [
        BrowserModule,
        BrowserAnimationsModule,
        AngularFireModule.initializeApp(environment.firebase),
        MatIconModule,
        MatButtonModule,
        MatDialogModule,
        MatSnackBarModule,

        TranslateModule.forRoot(),
        NgxPermissionsModule.forRoot(),

        /* @notadd modules */
        NotaddModule.forRoot(notaddConfig),
        NotaddErrorsModule,
        NotaddMatIconsModule,
        NotaddProgressBarModule,
        NotaddSidebarModule,
        NotaddThemePanelModule,

        LayoutModule,

        GraphQLModule,

        HttpClientModule,

        AppRoutingModule,
github rucken / core-nestjs / frontend / apps / demo / src / app / app.module.ts View on Github external
HttpClientModule,
    BrowserModule.withServerTransition({ appId: 'demo' }),
    TransferHttpCacheModule.forRoot(),
    BrowserCookiesModule.forRoot(),
    LangModule.forRoot({
      languages: [{
        title: translate('Russian'),
        code: 'ru',
        translations: [RuckenWebRuI18n, RuckenCoreRuI18n, DemoRuI18n]
      }, {
        title: translate('English'),
        code: 'en',
        translations: []
      }]
    }),
    NgxPermissionsModule.forRoot(),
    TokenModule.forRoot({
      withoutTokenUrls: [
        '/api/account/info',
        '/api/account/login'
      ]
    }),
    AccountModule.forRoot(),
    ThemesModule.forRoot(),
    RouterModule.forRoot(AppRoutes, { preloadingStrategy: PreloadAllModules, initialNavigation: 'enabled' }),
    ModalModule.forRoot(),
    AuthModalModule,
    NavbarModule,
    BsDatepickerModule.forRoot()
  ],
  providers: [
    { provide: ErrorHandler, useClass: CustomErrorHandler },
github RaymondCoplin / spring-boot-angular4-material-boilerplate / frontend / src / app / app.module.ts View on Github external
import { TemplateComponent } from "app/components/template/template.component";
import { TemplateService } from "app/components/template/template.service";

@NgModule({
  declarations: [
    AppComponent,
    TemplateComponent
  ],
  imports: [
    BrowserModule,
    BrowserAnimationsModule,
    FormsModule,
    HttpModule,
    SharedModule,
    AppRoutingModule,
    NgxPermissionsModule.forRoot()
  ],
  providers: [
    AuthService,
    TemplateService
  ],
  bootstrap: [
    AppComponent
  ]
})
export class AppModule { }
github rucken / core / apps / demo / src / app / app.module.ts View on Github external
import { APP_ROUTES } from './app.routes';
import { config } from './config/config';
import { SharedModule } from './shared/shared.module';
import { metaFactory } from './utils/meta-factory';

@NgModule({
  declarations: [AppComponent],
  imports: [
    RouterModule,
    SharedModule,
    HttpClientModule,
    BrowserModule.withServerTransition({
      appId: config.app.id
    }),
    TransferHttpCacheModule.forRoot(),
    NgxPermissionsModule.forRoot(),
    AuthModule.forRoot({
      apiUrl: environment.apiUrl,
      oauth: {
        providers: config.oauth
      }
    }),
    AccountModule.forRoot({
      apiUrl: environment.apiUrl
    }),
    LangModule.forRoot({
      languages: config.app.languages
    }),
    ThemesModule.forRoot(),
    RouterModule.forRoot(APP_ROUTES, {
      preloadingStrategy: PreloadAllModules,
      initialNavigation: 'enabled'
github AlexKhymenko / ngx-permissions / src / app / app.module.ts View on Github external
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';
import { NgxPermissionsModule } from 'ngx-permissions';
import { AppRoutingModule } from './app-routing.module';
import { HomeComponent } from './home/home.component';
import { InitialLoadComponent } from './initial-load/initial-load.component';
@NgModule({
  declarations: [
    AppComponent,
    HomeComponent,
    InitialLoadComponent
  ],
  imports: [
    BrowserModule,
    NgxPermissionsModule.forRoot(),
    AppRoutingModule

  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

ngx-permissions

Permission and roles based access control for your angular(angular 2,4,5,6,7,8+) applications(AOT, lazy modules compatible)

MIT
Latest version published 9 months ago

Package Health Score

66 / 100
Full package analysis