[Trunk|Library]: create class HelperFunctions in utils folder, where static scroll function is placed.

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@55415 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
konstantina.galouni 2019-04-24 10:39:15 +00:00
parent 8182d2cce8
commit 6125f3553e
1 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1,11 @@
export class HelperFunctions {
//Use this class function to create queryParams Objects in format {key1:value1} or {key1:value1,key2:value2,key3:value3,...} for multiple parameters
constructor() {}
public static scroll() {
if (typeof document !== 'undefined') {
//this.element.nativeElement.scrollIntoView();
window.scrollTo(0, 0);
}
}
}