blob: 20901e462c24d0d1189dbb6231588eff15a33ae1 [file] [log] [blame]
Barath Kumar R403234e2020-07-07 15:48:58 +05301/*
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 * @file Osm Repository Module.
20 */
21import { CommonModule } from '@angular/common';
22import { HttpClientModule } from '@angular/common/http';
23import { NgModule } from '@angular/core';
24import { FormsModule } from '@angular/forms';
25import { ReactiveFormsModule } from '@angular/forms';
26import { RouterModule, Routes } from '@angular/router';
27import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
28import { NgSelectModule } from '@ng-select/ng-select';
29import { TranslateModule } from '@ngx-translate/core';
30import { DataService } from 'DataService';
31import { LoaderModule } from 'LoaderModule';
32import { Ng2SmartTableModule } from 'ng2-smart-table';
33import { OsmRepoCreateUpdateComponent } from 'OsmRepoCreateUpdate';
34import { OsmRepositoriesComponent } from 'OsmRepositories';
35import { OsmRepositoriesActionComponent } from 'OsmRepositoriesAction';
36import { OsmRepositoriesDetailsComponent } from 'OsmRepositoriesDetails';
37import { PagePerRowModule } from 'PagePerRowModule';
38import { PageReloadModule } from 'PageReloadModule';
39
40/** To halndle project information */
41const projectInfo: {} = { title: '{project}', url: '/' };
42
43/**
44 * configures routers
45 */
46const routes: Routes = [
47 {
48 path: '',
49 component: OsmRepositoriesComponent,
50 children: [
51 {
52 path: 'details',
53 data: {
54 breadcrumb: [{ title: 'PAGE.DASHBOARD.DASHBOARD', url: '/' }, { title: 'PAGE.DASHBOARD.PROJECTS', url: '/projects' },
55 projectInfo, { title: 'PAGE.OSMREPO.MENUOSMREPO', url: null }]
56 },
57 component: OsmRepositoriesDetailsComponent
58 }
59 ]
60 }
61];
62/**
63 * Creating @NgModule component for Modules
64 */
65// tslint:disable-next-line: no-stateless-class
66@NgModule({
67 imports: [FormsModule, ReactiveFormsModule, CommonModule, HttpClientModule, TranslateModule,
68 RouterModule.forChild(routes), NgbModule, PagePerRowModule, Ng2SmartTableModule, LoaderModule, PageReloadModule, NgSelectModule],
69 declarations: [OsmRepositoriesComponent, OsmRepositoriesDetailsComponent, OsmRepositoriesActionComponent, OsmRepoCreateUpdateComponent],
70 providers: [
71 DataService
72 ],
73 entryComponents: [
74 OsmRepoCreateUpdateComponent
75 ]
76})
77/** Exporting a class @exports OsmRepositoriesModule */
78export class OsmRepositoriesModule { }