Open HugoHeneault opened 6 years ago
Hi. Thanks!
You could create your own pipe as a wrapper:
import { Pipe, PipeTransform } from '@angular/core';
import { LinkyPipe } from 'angular-linky';
@Pipe({ name: 'myLinky' })
export class MyLinkyPipe implements PipeTransform {
transform(value: string, options: any = {}): string {
// modify options here - add defaults like:
options.replaceFn = options.replaceFn || yourDefaultReplaceFn;
return new LinkyPipe().transform(value, options);
}
}
Cool! I'll use this for now. You can close it if you don't plan to make it one day :) Thanks!
First things firsts: thanks for your really cool pipe! :)
I'm working on an ionic app and I need to change the
replaceFn
for all pipes I use. It would be great if I could set it for the whole linky module instead of pipe by pipe.How could I do that?