blob: f63d59d0199899059ff1e20e7c366436ec860664 [file] [log] [blame]
kumaran.m3b4814a2020-05-01 19:48:54 +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 Page Reload Component
20 */
21import { Component, Injector } from '@angular/core';
22import { TranslateService } from '@ngx-translate/core';
23import { SharedService } from 'SharedService';
24/**
25 * Creating component
26 * @Component takes PageReload.html as template url
27 */
28@Component({
SANDHYA.JS0a34dfa2023-04-25 23:59:41 +053029 // eslint-disable-next-line @angular-eslint/component-selector
kumaran.m3b4814a2020-05-01 19:48:54 +053030 selector: 'page-reload',
31 templateUrl: './PageReload.html',
32 styleUrls: ['./PageReload.scss']
33})
34/** Exporting a class @exports PageReload */
SANDHYA.JS0a34dfa2023-04-25 23:59:41 +053035// eslint-disable-next-line @angular-eslint/component-class-suffix
kumaran.m3b4814a2020-05-01 19:48:54 +053036export class PageReload {
37 /** To inject services @public */
38 public injector: Injector;
39
40 /** handle translate @public */
41 public translateService: TranslateService;
42
43 /** Contains all methods related to shared @private */
44 private sharedService: SharedService;
45
46 constructor(injector: Injector) {
47 this.injector = injector;
48 this.translateService = this.injector.get(TranslateService);
49 this.sharedService = this.injector.get(SharedService);
50 }
51
52 /**
53 * Lifecyle Hooks the trigger before component is instantiate
54 */
55 public ngOnInit(): void {
56 // Empty Block
57 }
58
59 /** Handles select event @public */
60 public reloadPage(): void {
61 this.sharedService.dataEvent.emit();
62 }
63}