How to use pipe in ts not HTML

前端 未结 4 967
清歌不尽
清歌不尽 2021-02-02 12:33

I adding text into html element from ts

like this

this.legend.append(\'text\')
  .attr(\'x\', legendRectSize + legendSpacing)
  .attr(\'y\', legendRectSi         


        
4条回答
  •  鱼传尺愫
    2021-02-02 12:43

    If Pipename is your custom pipe then if you want to use the same in your ts file then you can use below code

    import {Pipename} from './pipename';
    
    Pipename.prototype.transform(arguments);//this is how u can use your custom pipe
    

提交回复
热议问题