X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=src%2Fapp%2Froles%2FRolesModule.ts;fp=src%2Fapp%2Froles%2FRolesModule.ts;h=88e1225e9e21a9986e888d3efd60030694a6c9a5;hb=3b4814aa2d3dec621dadb52f058ba95a3dc3a86a;hp=0000000000000000000000000000000000000000;hpb=1434673f8f8dc53bce5c350f04ac8df67b2ff84f;p=osm%2FNG-UI.git diff --git a/src/app/roles/RolesModule.ts b/src/app/roles/RolesModule.ts new file mode 100644 index 0000000..88e1225 --- /dev/null +++ b/src/app/roles/RolesModule.ts @@ -0,0 +1,87 @@ +/* + Copyright 2020 TATA ELXSI + + Licensed under the Apache License, Version 2.0 (the 'License'); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Author: KUMARAN M (kumaran.m@tataelxsi.co.in), RAJESH S (rajesh.s@tataelxsi.co.in), BARATH KUMAR R (barath.r@tataelxsi.co.in) +*/ + +/** + * @file Roles Module + */ +import { CommonModule } from '@angular/common'; +import { HttpClientModule } from '@angular/common/http'; +import { NgModule } from '@angular/core'; +import { FormsModule } from '@angular/forms'; +import { ReactiveFormsModule } from '@angular/forms'; +import { RouterModule, Routes } from '@angular/router'; +import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; +import { TranslateModule } from '@ngx-translate/core'; +import { LoaderModule } from 'LoaderModule'; +import { Ng2SmartTableModule } from 'ng2-smart-table'; +import { PagePerRowModule } from 'PagePerRowModule'; +import { PageReloadModule } from 'PageReloadModule'; +import { RolesComponent } from 'Roles'; +import { RolesActionComponent } from 'RolesAction'; +import { RolesCreateEditComponent } from 'RolesCreateEdit'; +import { RolesDetailsComponent } from 'RolesDetails'; + +/** const values for Roles Routes */ +const routes: Routes = [ + { + path: '', + component: RolesComponent, + children: [ + { + path: 'details', + data: { + breadcrumb: [{ title: 'PAGE.DASHBOARD.DASHBOARD', url: '/' }, { title: 'ROLES', url: null }] + }, + component: RolesDetailsComponent + }, + { + path: 'create', + data: { + breadcrumb: [{ title: 'PAGE.DASHBOARD.DASHBOARD', url: '/' }, { title: 'ROLES', url: '/roles/details' }, + { title: 'PAGE.ROLES.CREATEROLE', url: null }] + }, + component: RolesCreateEditComponent + }, + { + path: 'edit/:id', + data: { + breadcrumb: [{ title: 'PAGE.DASHBOARD.DASHBOARD', url: '/' }, { title: 'ROLES', url: '/roles/details' }, + { title: '{id}', url: null }] + }, + component: RolesCreateEditComponent + } + ] + } +]; +/** + * An NgModule is a class adorned with the @NgModule decorator function. + * @NgModule takes a metadata object that tells Angular how to compile and run module code. + */ +@NgModule({ + imports: [FormsModule, ReactiveFormsModule, CommonModule, HttpClientModule, TranslateModule, + RouterModule.forChild(routes), NgbModule, PagePerRowModule, Ng2SmartTableModule, LoaderModule, PageReloadModule], + declarations: [RolesComponent, RolesDetailsComponent, RolesActionComponent, RolesCreateEditComponent], + entryComponents: [RolesActionComponent] +}) +/** + * AppModule is the Root module for application + */ +export class RolesModule { + /** Variables declared to avoid state-less class */ + private rolesModule: string; +}