I adding text into html element from ts
like this
this.legend.append(\'text\')
.attr(\'x\', legendRectSize + legendSpacing)
.attr(\'y\', legendRectSi
import pipe in the component
import { PipeName } from './pipename'
include it in the provides
@Component({
selector: 'pipe-using-component',
templateUrl: './pipe-using-component.html',
providers: [
PipeName
],
})
inject it in the constructor
export class PipeUsingComponent {
constructor(private pipeName: PipeName)
}
var requiredResult = this.pipeName.transform(passvalue);
}