Open Venipa opened 5 years ago
Would be nice to programatically generate urls for the implementation with material2
import { Pipe, PipeTransform } from '@angular/core'; import { AvatarSource } from 'ngx-avatar'; import { SourceFactory } from 'ngx-avatar/lib/sources/source.factory'; @Pipe({ name: 'gravatar' }) export class GravatarPipe implements PipeTransform { constructor(private sourceFactory: SourceFactory) {} transform(value: string, [size]: [number]): any { return this.sourceFactory.newInstance(AvatarSource.GRAVATAR, value).getAvatar(size); } }
yarn add https://github.com/Venipa/ngx-avatar#build/dev if people want to try it
Would be nice to programatically generate urls for the implementation with material2