Angular中的纯管道和非纯管道

在Angular中可以自定义带参数的管道;只要遵循下面三条规则: 利用@pipe装饰器声明管道的名字 实现PipeTransform接口 如果是全局使用,则 include your pipe in the declarations array of the AppModule; 如果想要局部使用, 则 provide it in the providers array of your NgMod
相关文章
相关标签/搜索