[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:
parent
8182d2cce8
commit
6125f3553e
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue