File

src/lib/avatar-image.service.ts

Index

Methods

Methods

Public get
get(undefined: literal type)
Parameters :
Name Type Optional
literal type No
Returns : string
import { Injectable } from '@angular/core';
import { HttpParams, HttpRequest } from '@angular/common/http';

@Injectable({ providedIn: 'root' })
export class AvatarImageService {

  public get({ name }: { name: string }): string {
    return new HttpRequest(
      'GET',
      'https://eu.ui-avatars.com/api',
      {
        params: new HttpParams({ fromObject: { name } }),
      },
    ).urlWithParams;
  }

}

results matching ""

    No results matching ""