Angular中的純管道和非純管道

在Angular中可以自定義帶參數的管道;只要遵循下面三條規則: 利用@pipe裝飾器聲明管道的名字 實現PipeTransform接口 如果是全局使用,則 include your pipe in the declarations array of the AppModule; 如果想要局部使用, 則 provide it in the providers array of your NgMod
相關文章
相關標籤/搜索