Hi Amresh,
You can create a custom pipe in a following manner :
import {
Pipe,
PipeTransform
} from ‘@angular/core’;
@Pipe({
name: ‘name of pipe used in markup’
})
export class NameofClass implements PipeTransform {
transform(value: string, args: string[]): any {
//Play with value and argument and return the result
return value;
}
}
// This is just a sample script. Paste your real code (javascript or HTML) here.
if (‘this_is’ == /an_example/) {
of_beautifier();
} else {
var a = b ? (c % d) : e[f];
}
Thanks.