2 Copyright 2020 TATA ELXSI
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
8 http://www.apache.org/licenses/LICENSE-2.0
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.
16 Author: KUMARAN M (kumaran.m@tataelxsi.co.in), RAJESH S (rajesh.s@tataelxsi.co.in), BARATH KUMAR R (barath.r@tataelxsi.co.in)
19 * @file Page Reload Component
21 import { Component, Injector } from '@angular/core';
22 import { TranslateService } from '@ngx-translate/core';
23 import { SharedService } from 'SharedService';
26 * @Component takes PageReload.html as template url
29 selector: 'page-reload',
30 templateUrl: './PageReload.html',
31 styleUrls: ['./PageReload.scss']
33 /** Exporting a class @exports PageReload */
34 export class PageReload {
35 /** To inject services @public */
36 public injector: Injector;
38 /** handle translate @public */
39 public translateService: TranslateService;
41 /** Contains all methods related to shared @private */
42 private sharedService: SharedService;
44 constructor(injector: Injector) {
45 this.injector = injector;
46 this.translateService = this.injector.get(TranslateService);
47 this.sharedService = this.injector.get(SharedService);
51 * Lifecyle Hooks the trigger before component is instantiate
53 public ngOnInit(): void {
57 /** Handles select event @public */
58 public reloadPage(): void {
59 this.sharedService.dataEvent.emit();