dependencies Legend  Declarations  Module  Bootstrap  Providers  Exports cluster_RoutedAuthModule cluster_RoutedAuthModule_imports AuthModule AuthModule RoutedAuthModule RoutedAuthModule AuthModule->RoutedAuthModule

File

src/app/core/auth/auth.module.ts

Imports

import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { RouterModule, Routes } from '@angular/router';

import { BsDropdownModule } from 'ngx-bootstrap/dropdown';
import { PopoverModule } from 'ngx-bootstrap/popover';
import { TabsModule } from 'ngx-bootstrap/tabs';

import { ActionLabels, URLVerbs } from '../../shared/constants/app.constants';
import { SharedModule } from '../../shared/shared.module';
import { LoginComponent } from './login/login.component';
import { RoleDetailsComponent } from './role-details/role-details.component';
import { RoleFormComponent } from './role-form/role-form.component';
import { RoleListComponent } from './role-list/role-list.component';
import { SsoNotFoundComponent } from './sso/sso-not-found/sso-not-found.component';
import { UserFormComponent } from './user-form/user-form.component';
import { UserListComponent } from './user-list/user-list.component';
import { UserTabsComponent } from './user-tabs/user-tabs.component';

@NgModule({
  imports: [
    BsDropdownModule.forRoot(),
    CommonModule,
    FormsModule,
    PopoverModule.forRoot(),
    ReactiveFormsModule,
    SharedModule,
    TabsModule.forRoot(),
    RouterModule
  ],
  declarations: [
    LoginComponent,
    RoleDetailsComponent,
    RoleFormComponent,
    RoleListComponent,
    SsoNotFoundComponent,
    UserTabsComponent,
    UserListComponent,
    UserFormComponent
  ]
})
export class AuthModule {}

const routes: Routes = [
  { path: '', redirectTo: 'users', pathMatch: 'full' },
  {
    path: 'users',
    data: { breadcrumbs: 'Users' },
    children: [
      { path: '', component: UserListComponent },
      {
        path: 'create',
        component: UserFormComponent,
        data: { breadcrumbs: 'Create' }
      },
      {
        path: `${'edit'}/:username`,
        component: UserFormComponent,
        data: { breadcrumbs: 'Edit' }
      }
    ]
  },
  {
    path: 'roles',
    data: { breadcrumbs: 'Roles' },
    children: [
      { path: '', component: RoleListComponent },
      {
        path: 'create',
        component: RoleFormComponent,
        data: { breadcrumbs: 'Create' }
      },
      {
        path: `${'edit'}/:name`,
        component: RoleFormComponent,
        data: { breadcrumbs: 'Edit' }
      }
    ]
  }
];

@NgModule({
  imports: [AuthModule, RouterModule.forChild(routes)]
})
export class RoutedAuthModule {}

result-matching ""

    No results matching ""