How to use pipe in ts not HTML

前端 未结 4 975
清歌不尽
清歌不尽 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:49

    In your .ts

    import {YourPipe} from '/pipePath';
    
    
    let value = new YourPipe().transform(param);
    

提交回复
热议问题