Initial Commit - NG UI
[osm/NG-UI.git] / src / app / layouts / LayoutComponent.ts
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  * @file NS Instance Component
20  */
21 import { Component } from '@angular/core';
22 import { SharedService } from 'SharedService';
23 /**
24  * Creating component
25  * @Component takes LayoutComponent.html as template url
26  */
27 @Component({
28     selector: 'app-layout',
29     templateUrl: './LayoutComponent.html',
30     styleUrls: ['./LayoutComponent.scss']
31 })
32 /** Exporting a class @exports LayoutComponent */
33 export class LayoutComponent {
34     /** Contains all methods related to shared @private */
35     public sharedService: SharedService;
36
37     constructor(sharedService: SharedService) {
38         this.sharedService = sharedService;
39     }
40     /** method to handle go to top event @public */
41     public gotoTop(): void {
42         window.scroll({ behavior: 'smooth', top: 0, left: 0 });
43     }
44 }