| 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 Dashboard Module |
| 21 | */ |
| 22 | import { CommonModule } from '@angular/common'; |
| 23 | import { HttpClientModule } from '@angular/common/http'; |
| 24 | import { NgModule } from '@angular/core'; |
| 25 | import { FlexLayoutModule } from '@angular/flex-layout'; |
| 26 | import { FormsModule } 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 { DashboardComponent } from 'DashboardComponent'; |
| 31 | import { LoaderModule } from 'LoaderModule'; |
| 32 | import { ChartsModule } from 'ng2-charts'; |
| 33 | |
| 34 | /** To halndle project information */ |
| 35 | const projectInfo: {} = { title: '{project}', url: '/' }; |
| 36 | |
| 37 | /** const values for dashboard Routes */ |
| 38 | const routes: Routes = [ |
| 39 | { |
| 40 | path: '', |
| 41 | data: { |
| 42 | breadcrumb: [{ title: 'PAGE.DASHBOARD.DASHBOARD', url: '/' }, { title: 'PAGE.DASHBOARD.PROJECTS', url: '/projects' }, |
| 43 | projectInfo] |
| 44 | }, |
| 45 | component: DashboardComponent |
| 46 | } |
| 47 | ]; |
| 48 | /** |
| 49 | * An NgModule is a class adorned with the @NgModule decorator function. |
| 50 | * @NgModule takes a metadata object that tells Angular how to compile and run module code. |
| 51 | */ |
| 52 | @NgModule({ |
| 53 | imports: [FormsModule, CommonModule, HttpClientModule, FlexLayoutModule, TranslateModule, |
| 54 | ChartsModule, RouterModule.forChild(routes), NgbModule, LoaderModule], |
| 55 | declarations: [DashboardComponent] |
| 56 | }) |
| 57 | /** Exporting a class @exports DashboardModule */ |
| 58 | export class DashboardModule { |
| 59 | /** Variables declared to avoid state-less class */ |
| 60 | private dashboardModule: string; |
| 61 | } |