import { Injectable } from '@angular/core' ; @ Injectable ( ) export class SharedService { constructor ( ) { } param obj returns public static serializeQueryString ( obj ) { return Object . keys ( obj ) . map ( k => `${ k }=${ encodeURIComponent ( obj [ k ] ) }` ) . join ( '&' ) ; } }