1:创建pipe

ionic g pipe fstatus

2:使用(Ionic3)

(1)page下使用在*.module.ts中的imports下追加PipeModule

pipe的使用

然后在*.html下使用{{data.orderstatus | fstatus}}

pipe的使用

(2)components下使用

*.ts下引入pipe  。 important {fstatus} from '../../pipes/fstatus';

pipe的使用

*.html下使用,和page下html中使用方式一样

pipe的使用

相关文章:

  • 2021-05-18
  • 2021-07-26
  • 2021-10-24
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-31
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案