| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 1 | /* |
| 2 | Copyright 2020 TATA ELXSI |
| 3 | |
| 4 | Licensed under the Apache License, Version 2.0 (the 'License'); |
| 5 | you may not use this file except in compliance with the License. |
| 6 | You may obtain a copy of the License at |
| 7 | |
| 8 | http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 10 | Unless required by applicable law or agreed to in writing, software |
| 11 | distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | See the License for the specific language governing permissions and |
| 14 | limitations under the License. |
| 15 | |
| 16 | Author: KUMARAN M (kumaran.m@tataelxsi.co.in), RAJESH S (rajesh.s@tataelxsi.co.in), BARATH KUMAR R (barath.r@tataelxsi.co.in) |
| 17 | */ |
| 18 | |
| 19 | /** |
| 20 | * @file Roles Module |
| 21 | */ |
| 22 | import { CommonModule } from '@angular/common'; |
| 23 | import { HttpClientModule } from '@angular/common/http'; |
| 24 | import { NgModule } from '@angular/core'; |
| 25 | import { FormsModule } from '@angular/forms'; |
| 26 | import { ReactiveFormsModule } from '@angular/forms'; |
| 27 | import { RouterModule, Routes } from '@angular/router'; |
| 28 | import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; |
| 29 | import { TranslateModule } from '@ngx-translate/core'; |
| 30 | import { LoaderModule } from 'LoaderModule'; |
| 31 | import { Ng2SmartTableModule } from 'ng2-smart-table'; |
| 32 | import { PagePerRowModule } from 'PagePerRowModule'; |
| 33 | import { PageReloadModule } from 'PageReloadModule'; |
| 34 | import { RolesComponent } from 'Roles'; |
| 35 | import { RolesActionComponent } from 'RolesAction'; |
| 36 | import { RolesCreateEditComponent } from 'RolesCreateEdit'; |
| 37 | import { RolesDetailsComponent } from 'RolesDetails'; |
| 38 | |
| 39 | /** const values for Roles Routes */ |
| 40 | const routes: Routes = [ |
| 41 | { |
| 42 | path: '', |
| 43 | component: RolesComponent, |
| 44 | children: [ |
| 45 | { |
| 46 | path: 'details', |
| 47 | data: { |
| 48 | breadcrumb: [{ title: 'PAGE.DASHBOARD.DASHBOARD', url: '/' }, { title: 'ROLES', url: null }] |
| 49 | }, |
| 50 | component: RolesDetailsComponent |
| 51 | }, |
| 52 | { |
| 53 | path: 'create', |
| 54 | data: { |
| 55 | breadcrumb: [{ title: 'PAGE.DASHBOARD.DASHBOARD', url: '/' }, { title: 'ROLES', url: '/roles/details' }, |
| 56 | { title: 'PAGE.ROLES.CREATEROLE', url: null }] |
| 57 | }, |
| 58 | component: RolesCreateEditComponent |
| 59 | }, |
| 60 | { |
| 61 | path: 'edit/:id', |
| 62 | data: { |
| 63 | breadcrumb: [{ title: 'PAGE.DASHBOARD.DASHBOARD', url: '/' }, { title: 'ROLES', url: '/roles/details' }, |
| 64 | { title: '{id}', url: null }] |
| 65 | }, |
| 66 | component: RolesCreateEditComponent |
| 67 | } |
| 68 | ] |
| 69 | } |
| 70 | ]; |
| 71 | /** |
| 72 | * An NgModule is a class adorned with the @NgModule decorator function. |
| 73 | * @NgModule takes a metadata object that tells Angular how to compile and run module code. |
| 74 | */ |
| 75 | @NgModule({ |
| 76 | imports: [FormsModule, ReactiveFormsModule, CommonModule, HttpClientModule, TranslateModule, |
| 77 | RouterModule.forChild(routes), NgbModule, PagePerRowModule, Ng2SmartTableModule, LoaderModule, PageReloadModule], |
| SANDHYA.JS | 0a34dfa | 2023-04-25 23:59:41 +0530 | [diff] [blame] | 78 | declarations: [RolesComponent, RolesDetailsComponent, RolesActionComponent, RolesCreateEditComponent] |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 79 | }) |
| 80 | /** |
| 81 | * AppModule is the Root module for application |
| 82 | */ |
| 83 | export class RolesModule { |
| 84 | /** Variables declared to avoid state-less class */ |
| 85 | private rolesModule: string; |
| 86 | } |