How to use the ngx-permissions.NgxPermissionsModule.forChild 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 rucken / core / apps / demo / src / app / pages / account-page / account-page.module.ts View on Github external
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { NavSidebarModule } from '@rucken/web';
import { NgxPermissionsModule } from 'ngx-permissions';
import { SharedModule } from '../../shared/shared.module';
import { AccountPageComponent } from './account-page.component';
import { ACCOUNT_PAGE_ROUTES } from './account-page.routes';

@NgModule({
  imports: [
    SharedModule,
    NgxPermissionsModule.forChild(),
    NavSidebarModule,
    RouterModule.forChild(ACCOUNT_PAGE_ROUTES)
  ],
  declarations: [AccountPageComponent]
})
export class AccountPageModule {}
github rucken / core / apps / demo / src / app / pages / entities-page / users-frame / users-frame.module.ts View on Github external
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router';
import { UsersGridModule } from '@rucken/web';
import { NgxPermissionsModule } from 'ngx-permissions';
import { SharedModule } from '../../../shared/shared.module';
import { UsersFrameComponent } from './users-frame.component';
import { USERS_FRAME_ROUTES } from './users-frame.routes';

@NgModule({
  imports: [
    SharedModule,
    NgxPermissionsModule.forChild(),
    RouterModule.forChild(USERS_FRAME_ROUTES),
    UsersGridModule,
    FormsModule
  ],
  declarations: [UsersFrameComponent]
})
export class UsersFrameModule {}
github AlexKhymenko / ngx-permissions / application / src / app / lazy-role-isolate / lazy-role-isolate.module.ts View on Github external
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { NgxPermissionsModule } from 'ngx-permissions';

import { LazyIsolateRolesRoutingModule } from './lazy-isolate-role-routing.module';
import { LazyRoleIsolateTestComponent } from './lazy-role-isolate-test/lazy-role-isolate-test.component';

@NgModule({
  imports: [
    CommonModule,
    LazyIsolateRolesRoutingModule,
    NgxPermissionsModule.forChild({
      permissionsIsolate: true,
      rolesIsolate: true,
      configurationIsolate: true
    })
  ],
  declarations: [
  LazyRoleIsolateTestComponent
  ]
})
export class LazyRoleIsolateModule { }
github rucken / core / apps / demo / src / app / pages / entities-page / entities-page.module.ts View on Github external
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { NavSidebarModule } from '@rucken/web';
import { NgxPermissionsModule } from 'ngx-permissions';
import { SharedModule } from '../../shared/shared.module';
import { EntitiesPageComponent } from './entities-page.component';
import { ENTITIES_PAGE_ROUTES } from './entities-page.routes';

@NgModule({
  imports: [
    SharedModule,
    NgxPermissionsModule.forChild(),
    NavSidebarModule,
    RouterModule.forChild(ENTITIES_PAGE_ROUTES)
  ],
  declarations: [EntitiesPageComponent]
})
export class EntitiesPageModule {}
github AlexKhymenko / ngx-permissions / application / src / app / lazy-module / lazy-module.module.ts View on Github external
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { LazyRoutingModule } from './lazy-routing.module';
import { LazyComponentComponent } from './lazy-component/lazy-component.component';
import { NgxPermissionsModule } from 'ngx-permissions';

@NgModule({
  imports: [
    CommonModule,
    LazyRoutingModule,
    NgxPermissionsModule.forChild()

  ],
  declarations: [LazyComponentComponent]
})
export class LazyModule { }
github rucken / core / apps / demo / src / app / pages / account-page / profile-frame / profile-frame.module.ts View on Github external
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { ProfilePanelModule } from '@rucken/web';
import { NgxPermissionsModule } from 'ngx-permissions';
import { SharedModule } from '../../../shared/shared.module';
import { ProfileFrameComponent } from './profile-frame.component';
import { PROFILE_FRAME_ROUTES } from './profile-frame.routes';

@NgModule({
  imports: [
    SharedModule,
    NgxPermissionsModule.forChild(),
    ProfilePanelModule,
    RouterModule.forChild(PROFILE_FRAME_ROUTES)
  ],
  declarations: [ProfileFrameComponent]
})
export class ProfileFrameModule {}
github rucken / core / apps / demo / src / app / pages / entities-page / groups-frame / groups-frame.module.ts View on Github external
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router';
import { GroupsGridModule } from '@rucken/web';
import { NgxPermissionsModule } from 'ngx-permissions';
import { SharedModule } from '../../../shared/shared.module';
import { GroupsFrameComponent } from './groups-frame.component';
import { GROUPS_FRAME_ROUTES } from './groups-frame.routes';

@NgModule({
  imports: [
    SharedModule,
    NgxPermissionsModule.forChild(),
    RouterModule.forChild(GROUPS_FRAME_ROUTES),
    GroupsGridModule,
    FormsModule
  ],
  declarations: [GroupsFrameComponent]
})
export class GroupsFrameModule {}
github rucken / core / apps / demo / src / app / pages / entities-page / permissions-frame / permissions-frame.module.ts View on Github external
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router';
import { PermissionsGridModule } from '@rucken/web';
import { NgxPermissionsModule } from 'ngx-permissions';
import { SharedModule } from '../../../shared/shared.module';
import { PermissionsFrameComponent } from './permissions-frame.component';
import { PERMISSIONS_FRAME_ROUTES } from './permissions-frame.routes';

@NgModule({
  imports: [
    SharedModule,
    NgxPermissionsModule.forChild(),
    RouterModule.forChild(PERMISSIONS_FRAME_ROUTES),
    PermissionsGridModule,
    FormsModule
  ],
  declarations: [PermissionsFrameComponent]
})
export class PermissionsFrameModule {}
github rucken / core-nestjs / frontend / apps / demo / src / app / components / pages / admin-page / groups-frame / groups-frame.module.ts View on Github external
import { ModuleWithProviders, NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router';
import { GroupsGridModule } from '@rucken/web';
import { SharedModule } from '../../../../shared/shared.module';
import { GroupsFrameComponent } from './groups-frame.component';
import { GroupsFrameRoutes } from './groups-frame.routes';
import { NgxPermissionsModule } from 'ngx-permissions';

@NgModule({
  imports: [
    SharedModule,
    NgxPermissionsModule.forChild(),
    RouterModule.forChild(GroupsFrameRoutes),
    GroupsGridModule,
    FormsModule
  ],
  declarations: [
    GroupsFrameComponent
  ]
})
export class GroupsFrameModule {
  static forRoot(): ModuleWithProviders {
    return {
      ngModule: GroupsFrameModule,
      providers: []
    };
  }
}
github AlexKhymenko / ngx-permissions / application / src / app / lazy-roles-async-isolate / lazy-roles-async-isolate.module.ts View on Github external
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { LazyRolesAsyncTestComponent } from './lazy-roles-async-test/lazy-roles-async-test.component';
import { NgxPermissionsModule } from 'ngx-permissions';
import { AsyncTestService } from './async-test.service';
import { LazyIsolateAsyncRolesRoutingModule } from './lazy-isolate-role-async-routing.module';

@NgModule({
  imports: [
    CommonModule,
    NgxPermissionsModule.forChild({
      permissionsIsolate: true,
      rolesIsolate: true
    }),
    LazyIsolateAsyncRolesRoutingModule
  ],
  providers: [
    AsyncTestService
  ],
  declarations: [LazyRolesAsyncTestComponent]
})
export class LazyRolesAsyncIsolateModule { }

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 10 months ago

Package Health Score

66 / 100
Full package analysis