openaire-library/utils/HelperFunctions.class.ts

11 lines
366 B
TypeScript

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);
}
}
}