Skip to content

Instantly share code, notes, and snippets.

View alkaj's full-sized avatar
🏠
Working from home

Junior Kamla alkaj

🏠
Working from home
View GitHub Profile
@alkaj
alkaj / RemoteHelper.ts
Last active August 9, 2020 21:18
Angular Remote service helper
import { environment } from 'src/environments/environment';
import { HttpClient, HttpHeaders } from '@angular/common/http';
export class RemoteHelper {
static params(p: string) {
return p ? '?' + p.split(',').join('&') : ''; // Expecting query parameters in a string like 'id=3,level=8,page=1'
}
static path(endpoint: string) {